|
@@ 4051-4063 (lines=13) @@
|
| 4048 |
|
_xmlftime.add_element('month', str(first_time_month)) |
| 4049 |
|
_xmlftime.add_element('year', str(first_time_year)) |
| 4050 |
|
|
| 4051 |
|
if duration: |
| 4052 |
|
if not duration_unit: |
| 4053 |
|
raise RequiredArgument( |
| 4054 |
|
'Setting duration requires duration_unit argument') |
| 4055 |
|
|
| 4056 |
|
if not duration_unit in TIME_UNITS: |
| 4057 |
|
raise InvalidArgument( |
| 4058 |
|
'duration_unit must be one of {units} but {actual} has ' |
| 4059 |
|
'been passed'.format( |
| 4060 |
|
units=', '.join(TIME_UNITS), actual=duration_unit)) |
| 4061 |
|
|
| 4062 |
|
_xmlduration = cmd.add_element('duration', str(duration)) |
| 4063 |
|
_xmlduration.add_element('unit', duration_unit) |
| 4064 |
|
|
| 4065 |
|
if period: |
| 4066 |
|
if not period_unit: |
|
@@ 1218-1230 (lines=13) @@
|
| 1215 |
|
_xmlftime.add_element('month', str(first_time_month)) |
| 1216 |
|
_xmlftime.add_element('year', str(first_time_year)) |
| 1217 |
|
|
| 1218 |
|
if duration: |
| 1219 |
|
if not duration_unit: |
| 1220 |
|
raise RequiredArgument( |
| 1221 |
|
'Setting duration requires duration_unit argument') |
| 1222 |
|
|
| 1223 |
|
if not duration_unit in TIME_UNITS: |
| 1224 |
|
raise InvalidArgument( |
| 1225 |
|
'duration_unit must be one of {units} but {actual} has ' |
| 1226 |
|
'been passed'.format( |
| 1227 |
|
units=', '.join(TIME_UNITS), actual=duration_unit)) |
| 1228 |
|
|
| 1229 |
|
_xmlduration = cmd.add_element('duration', str(duration)) |
| 1230 |
|
_xmlduration.add_element('unit', duration_unit) |
| 1231 |
|
|
| 1232 |
|
if period: |
| 1233 |
|
if not period_unit: |