@@ 4147-4172 (lines=26) @@ | ||
4144 | if name: |
|
4145 | cmd.add_element('name', name) |
|
4146 | ||
4147 | if first_time_minute or first_time_hour or first_time_day_of_month or \ |
|
4148 | first_time_month or first_time_year: |
|
4149 | ||
4150 | if not first_time_minute: |
|
4151 | raise RequiredArgument( |
|
4152 | 'Setting first_time requires first_time_minute argument') |
|
4153 | if not first_time_hour: |
|
4154 | raise RequiredArgument( |
|
4155 | 'Setting first_time requires first_time_hour argument') |
|
4156 | if not first_time_day_of_month: |
|
4157 | raise RequiredArgument( |
|
4158 | 'Setting first_time requires first_time_day_of_month ' |
|
4159 | 'argument') |
|
4160 | if not first_time_month: |
|
4161 | raise RequiredArgument( |
|
4162 | 'Setting first_time requires first_time_month argument') |
|
4163 | if not first_time_year: |
|
4164 | raise RequiredArgument( |
|
4165 | 'Setting first_time requires first_time_year argument') |
|
4166 | ||
4167 | _xmlftime = cmd.add_element('first_time') |
|
4168 | _xmlftime.add_element('minute', str(first_time_minute)) |
|
4169 | _xmlftime.add_element('hour', str(first_time_hour)) |
|
4170 | _xmlftime.add_element('day_of_month', str(first_time_day_of_month)) |
|
4171 | _xmlftime.add_element('month', str(first_time_month)) |
|
4172 | _xmlftime.add_element('year', str(first_time_year)) |
|
4173 | ||
4174 | if duration: |
|
4175 | if not duration_unit: |
|
@@ 1301-1326 (lines=26) @@ | ||
1298 | if comment: |
|
1299 | cmd.add_element('comment', comment) |
|
1300 | ||
1301 | if first_time_minute or first_time_hour or first_time_day_of_month or \ |
|
1302 | first_time_month or first_time_year: |
|
1303 | ||
1304 | if not first_time_minute: |
|
1305 | raise RequiredArgument( |
|
1306 | 'Setting first_time requires first_time_minute argument') |
|
1307 | if not first_time_hour: |
|
1308 | raise RequiredArgument( |
|
1309 | 'Setting first_time requires first_time_hour argument') |
|
1310 | if not first_time_day_of_month: |
|
1311 | raise RequiredArgument( |
|
1312 | 'Setting first_time requires first_time_day_of_month ' |
|
1313 | 'argument') |
|
1314 | if not first_time_month: |
|
1315 | raise RequiredArgument( |
|
1316 | 'Setting first_time requires first_time_month argument') |
|
1317 | if not first_time_year: |
|
1318 | raise RequiredArgument( |
|
1319 | 'Setting first_time requires first_time_year argument') |
|
1320 | ||
1321 | _xmlftime = cmd.add_element('first_time') |
|
1322 | _xmlftime.add_element('minute', str(first_time_minute)) |
|
1323 | _xmlftime.add_element('hour', str(first_time_hour)) |
|
1324 | _xmlftime.add_element('day_of_month', str(first_time_day_of_month)) |
|
1325 | _xmlftime.add_element('month', str(first_time_month)) |
|
1326 | _xmlftime.add_element('year', str(first_time_year)) |
|
1327 | ||
1328 | if duration: |
|
1329 | if not duration_unit: |