Update hacking test-requirement
Update the hacking test-requirement to match openstack/requirements global-requirements.txt Fix errors caught by new version of hacking. Change-Id: I90e9e9ed106b13b155b0b88fa2800736a9203814
This commit is contained in:
parent
691e5167b0
commit
cf13e1a7ad
|
@ -1,4 +1,4 @@
|
||||||
hacking>=0.5.6,<0.8
|
hacking>=0.11.0,<0.12 # Apache-2.0
|
||||||
|
|
||||||
coverage>=3.6
|
coverage>=3.6
|
||||||
discover
|
discover
|
||||||
|
|
|
@ -74,7 +74,7 @@ class Schedule(object):
|
||||||
str(sched_yaml['start_date']), '%Y%m%d')
|
str(sched_yaml['start_date']), '%Y%m%d')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ValueError("Could not parse 'start_date' (%s) in %s" %
|
raise ValueError("Could not parse 'start_date' (%s) in %s" %
|
||||||
(sched_yaml['start_date'], self.filefrom))
|
(sched_yaml['start_date'], self.filefrom))
|
||||||
else:
|
else:
|
||||||
self.start_date = datetime.datetime.utcnow()
|
self.start_date = datetime.datetime.utcnow()
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ class Schedule(object):
|
||||||
self.duration = int(sched_yaml['duration'])
|
self.duration = int(sched_yaml['duration'])
|
||||||
except ValueError:
|
except ValueError:
|
||||||
raise ValueError("Could not parse 'duration' (%s) in %s" %
|
raise ValueError("Could not parse 'duration' (%s) in %s" %
|
||||||
(sched_yaml['duration'], self.filefrom))
|
(sched_yaml['duration'], self.filefrom))
|
||||||
else:
|
else:
|
||||||
self.duration = 60
|
self.duration = 60
|
||||||
|
|
||||||
|
|
|
@ -61,11 +61,11 @@ class BiWeeklyRecurrence(object):
|
||||||
"""
|
"""
|
||||||
nextweek_day = WeeklyRecurrence().next_occurence(current_date, day)
|
nextweek_day = WeeklyRecurrence().next_occurence(current_date, day)
|
||||||
if nextweek_day.isocalendar()[1] % 2:
|
if nextweek_day.isocalendar()[1] % 2:
|
||||||
## ISO week is odd
|
# ISO week is odd
|
||||||
if self.style == 'odd':
|
if self.style == 'odd':
|
||||||
return nextweek_day
|
return nextweek_day
|
||||||
else:
|
else:
|
||||||
## ISO week is even
|
# ISO week is even
|
||||||
if self.style == 'even':
|
if self.style == 'even':
|
||||||
return nextweek_day
|
return nextweek_day
|
||||||
# If week doesn't match rule, skip one week
|
# If week doesn't match rule, skip one week
|
||||||
|
|
Loading…
Reference in New Issue