@@ 1903-1912 (lines=10) @@ | ||
1900 | if schedule_id: |
|
1901 | cmd.add_element("schedule", attrs={"id": schedule_id}) |
|
1902 | ||
1903 | if schedule_periods is not None: |
|
1904 | if ( |
|
1905 | not isinstance(schedule_periods, numbers.Integral) |
|
1906 | or schedule_periods < 0 |
|
1907 | ): |
|
1908 | raise InvalidArgument( |
|
1909 | "schedule_periods must be an integer greater or equal " |
|
1910 | "than 0" |
|
1911 | ) |
|
1912 | cmd.add_element("schedule_periods", str(schedule_periods)) |
|
1913 | ||
1914 | if observers is not None: |
|
1915 | if not _is_list_like(observers): |
|
@@ 6866-6875 (lines=10) @@ | ||
6863 | if schedule_id: |
|
6864 | cmd.add_element("schedule", attrs={"id": schedule_id}) |
|
6865 | ||
6866 | if schedule_periods is not None: |
|
6867 | if ( |
|
6868 | not isinstance(schedule_periods, numbers.Integral) |
|
6869 | or schedule_periods < 0 |
|
6870 | ): |
|
6871 | raise InvalidArgument( |
|
6872 | "schedule_periods must be an integer greater or equal " |
|
6873 | "than 0" |
|
6874 | ) |
|
6875 | cmd.add_element("schedule_periods", str(schedule_periods)) |
|
6876 | ||
6877 | if alert_ids is not None: |
|
6878 | if not _is_list_like(alert_ids): |