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:
John L. Villalovos 2016-08-23 16:28:12 -07:00
parent 691e5167b0
commit cf13e1a7ad
3 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
hacking>=0.5.6,<0.8
hacking>=0.11.0,<0.12 # Apache-2.0
coverage>=3.6
discover

View File

@ -74,7 +74,7 @@ class Schedule(object):
str(sched_yaml['start_date']), '%Y%m%d')
except ValueError:
raise ValueError("Could not parse 'start_date' (%s) in %s" %
(sched_yaml['start_date'], self.filefrom))
(sched_yaml['start_date'], self.filefrom))
else:
self.start_date = datetime.datetime.utcnow()
@ -84,7 +84,7 @@ class Schedule(object):
self.duration = int(sched_yaml['duration'])
except ValueError:
raise ValueError("Could not parse 'duration' (%s) in %s" %
(sched_yaml['duration'], self.filefrom))
(sched_yaml['duration'], self.filefrom))
else:
self.duration = 60

View File

@ -61,11 +61,11 @@ class BiWeeklyRecurrence(object):
"""
nextweek_day = WeeklyRecurrence().next_occurence(current_date, day)
if nextweek_day.isocalendar()[1] % 2:
## ISO week is odd
# ISO week is odd
if self.style == 'odd':
return nextweek_day
else:
## ISO week is even
# ISO week is even
if self.style == 'even':
return nextweek_day
# If week doesn't match rule, skip one week