Skip to content
Snippets Groups Projects
Commit f6a5f063 authored by Kevin Lyda's avatar Kevin Lyda :speech_balloon:
Browse files

Hush some pylint errors.

parent a833a541
Branches
No related tags found
No related merge requests found
......@@ -342,22 +342,22 @@ class CronTimeField(object):
return self._text
@property
def kind(self):
def Kind(self):
"""Kind field."""
return self._kind
@property
def start(self):
def Start(self):
"""Start value of this field."""
return self._start
@property
def end(self):
def End(self):
"""End value of this field."""
return self._end
@property
def step(self):
def Step(self):
"""Step for this field."""
return self._step
......@@ -488,7 +488,7 @@ def ChkCTStarOnly(cron_time_field):
"""
if not cron_time_field:
return True
if len(cron_time_field) == 1 and cron_time_field[0].kind == 'star':
if len(cron_time_field) == 1 and cron_time_field[0].Kind == 'star':
return True
return False
......@@ -693,6 +693,7 @@ class CronLineTimeAction(object):
self.command = command
def _CheckTimeField(self, log):
"""Virtual method to be implemented by subclasses to check time field."""
pass
def ValidateAndLog(self, log):
......@@ -782,6 +783,11 @@ class CronLineUnknown(object):
"""For unrecognised cron lines."""
def ValidateAndLog(self, log):
"""Emits an error for unrecognised cron lines.
Args:
log: A LogCounter instance to record issues.
"""
log.LineError(log.MSG_LINE_ERROR, 'Failed to parse line.')
......
......@@ -71,10 +71,10 @@ class FSMUnitTest(unittest.TestCase):
len(parsed_fields['cron_times'])))
for i in range(min(len(parsed_fields['cron_times']),
len(check_parsed_fields['cron_times']))):
self.assertEquals(parsed_fields['cron_times'][i].kind,
self.assertEquals(parsed_fields['cron_times'][i].Kind,
check_parsed_fields['cron_times'][i][0],
'Parser detected "%s" field not "%s"'
% (parsed_fields['cron_times'][i].kind,
% (parsed_fields['cron_times'][i].Kind,
check_parsed_fields['cron_times'][i][0]))
self.assertEquals('%s' % parsed_fields['cron_times'][i],
check_parsed_fields['cron_times'][i][1],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment