@@ 1860-1869 (lines=10) @@ | ||
1857 | if schedule_id: |
|
1858 | cmd.add_element("schedule", attrs={"id": schedule_id}) |
|
1859 | ||
1860 | if schedule_periods is not None: |
|
1861 | if ( |
|
1862 | not isinstance(schedule_periods, numbers.Integral) |
|
1863 | or schedule_periods < 0 |
|
1864 | ): |
|
1865 | raise InvalidArgument( |
|
1866 | "schedule_periods must be an integer greater or equal " |
|
1867 | "than 0" |
|
1868 | ) |
|
1869 | cmd.add_element("schedule_periods", str(schedule_periods)) |
|
1870 | ||
1871 | if observers is not None: |
|
1872 | if not is_list_like(observers): |
|
@@ 6819-6828 (lines=10) @@ | ||
6816 | if schedule_id: |
|
6817 | cmd.add_element("schedule", attrs={"id": schedule_id}) |
|
6818 | ||
6819 | if schedule_periods is not None: |
|
6820 | if ( |
|
6821 | not isinstance(schedule_periods, numbers.Integral) |
|
6822 | or schedule_periods < 0 |
|
6823 | ): |
|
6824 | raise InvalidArgument( |
|
6825 | "schedule_periods must be an integer greater or equal " |
|
6826 | "than 0" |
|
6827 | ) |
|
6828 | cmd.add_element("schedule_periods", str(schedule_periods)) |
|
6829 | ||
6830 | if alert_ids is not None: |
|
6831 | if not is_list_like(alert_ids): |