@@ 3012-3037 (lines=26) @@ | ||
3009 | if name: |
|
3010 | cmd.add_element('name', name) |
|
3011 | ||
3012 | if first_time_minute or first_time_hour or first_time_day_of_month or \ |
|
3013 | first_time_month or first_time_year: |
|
3014 | ||
3015 | if not first_time_minute: |
|
3016 | raise RequiredArgument( |
|
3017 | 'Setting first_time requires first_time_minute argument') |
|
3018 | if not first_time_hour: |
|
3019 | raise RequiredArgument( |
|
3020 | 'Setting first_time requires first_time_hour argument') |
|
3021 | if not first_time_day_of_month: |
|
3022 | raise RequiredArgument( |
|
3023 | 'Setting first_time requires first_time_day_of_month ' |
|
3024 | 'argument') |
|
3025 | if not first_time_month: |
|
3026 | raise RequiredArgument( |
|
3027 | 'Setting first_time requires first_time_month argument') |
|
3028 | if not first_time_year: |
|
3029 | raise RequiredArgument( |
|
3030 | 'Setting first_time requires first_time_year argument') |
|
3031 | ||
3032 | _xmlftime = cmd.add_element('first_time') |
|
3033 | _xmlftime.add_element('minute', str(first_time_minute)) |
|
3034 | _xmlftime.add_element('hour', str(first_time_hour)) |
|
3035 | _xmlftime.add_element('day_of_month', str(first_time_day_of_month)) |
|
3036 | _xmlftime.add_element('month', str(first_time_month)) |
|
3037 | _xmlftime.add_element('year', str(first_time_year)) |
|
3038 | ||
3039 | if duration: |
|
3040 | if not duration_unit: |
|
@@ 1064-1089 (lines=26) @@ | ||
1061 | if comment: |
|
1062 | cmd.add_element('comment', comment) |
|
1063 | ||
1064 | if first_time_minute or first_time_hour or first_time_day_of_month or \ |
|
1065 | first_time_month or first_time_year: |
|
1066 | ||
1067 | if not first_time_minute: |
|
1068 | raise RequiredArgument( |
|
1069 | 'Setting first_time requires first_time_minute argument') |
|
1070 | if not first_time_hour: |
|
1071 | raise RequiredArgument( |
|
1072 | 'Setting first_time requires first_time_hour argument') |
|
1073 | if not first_time_day_of_month: |
|
1074 | raise RequiredArgument( |
|
1075 | 'Setting first_time requires first_time_day_of_month ' |
|
1076 | 'argument') |
|
1077 | if not first_time_month: |
|
1078 | raise RequiredArgument( |
|
1079 | 'Setting first_time requires first_time_month argument') |
|
1080 | if not first_time_year: |
|
1081 | raise RequiredArgument( |
|
1082 | 'Setting first_time requires first_time_year argument') |
|
1083 | ||
1084 | _xmlftime = cmd.add_element('first_time') |
|
1085 | _xmlftime.add_element('minute', str(first_time_minute)) |
|
1086 | _xmlftime.add_element('hour', str(first_time_hour)) |
|
1087 | _xmlftime.add_element('day_of_month', str(first_time_day_of_month)) |
|
1088 | _xmlftime.add_element('month', str(first_time_month)) |
|
1089 | _xmlftime.add_element('year', str(first_time_year)) |
|
1090 | ||
1091 | if duration: |
|
1092 | if not duration_unit: |