mirror of
https://github.com/ansible/awx.git
synced 2026-03-22 03:17:39 -02:30
Merge pull request #1115 from ryanpetrello/newer-dateutil
remove an RRULE parsing bug fix that landed upstream in python-dateutil
This commit is contained in:
@@ -97,7 +97,7 @@ class Schedule(CommonModel, LaunchTimeConfig):
|
|||||||
@classmethod
|
@classmethod
|
||||||
def rrulestr(cls, rrule, **kwargs):
|
def rrulestr(cls, rrule, **kwargs):
|
||||||
"""
|
"""
|
||||||
Apply our own custom rrule parsing logic to support TZID=
|
Apply our own custom rrule parsing requirements
|
||||||
"""
|
"""
|
||||||
kwargs['forceset'] = True
|
kwargs['forceset'] = True
|
||||||
x = dateutil.rrule.rrulestr(rrule, **kwargs)
|
x = dateutil.rrule.rrulestr(rrule, **kwargs)
|
||||||
@@ -108,15 +108,6 @@ class Schedule(CommonModel, LaunchTimeConfig):
|
|||||||
'A valid TZID must be provided (e.g., America/New_York)'
|
'A valid TZID must be provided (e.g., America/New_York)'
|
||||||
)
|
)
|
||||||
|
|
||||||
if r._dtstart and r._until:
|
|
||||||
# If https://github.com/dateutil/dateutil/pull/634 ever makes
|
|
||||||
# it into a python-dateutil release, we could remove this block.
|
|
||||||
if all((
|
|
||||||
r._dtstart.tzinfo != dateutil.tz.tzlocal(),
|
|
||||||
r._until.tzinfo != dateutil.tz.tzutc(),
|
|
||||||
)):
|
|
||||||
raise ValueError('RRULE UNTIL values must be specified in UTC')
|
|
||||||
|
|
||||||
if 'MINUTELY' in rrule or 'HOURLY' in rrule:
|
if 'MINUTELY' in rrule or 'HOURLY' in rrule:
|
||||||
try:
|
try:
|
||||||
first_event = x[0]
|
first_event = x[0]
|
||||||
|
|||||||
Reference in New Issue
Block a user