Fix flake8 warnings.

This commit is contained in:
Chris Church 2015-04-09 22:55:53 -04:00
parent 0d9d9db1f9
commit 48bbac7f18
3 changed files with 3 additions and 4 deletions

View File

@ -55,7 +55,7 @@ class FactGetSingleFactsTest(BaseFactTest):
self.fact_data = []
self.fact_objs = []
self.hostnames = []
for i in range(1, host_count+1):
for i in range(1, host_count + 1):
fact_data = deepcopy(TEST_FACT_DATA)
fact_data['hostname'] = fact_data['hostname'] % (i)
fact_data['add_fact_data']['timestamp'] = datetime.now().replace(year=2015 - i)

View File

@ -10,7 +10,6 @@ from copy import deepcopy
# AWX
from awx.fact.models.fact import * # noqa
from awx.main.tests.base import BaseTest, MongoDBRequired
from .base import BaseFactTest
__all__ = ['FactHostTest', 'FactTest', 'FactGetHostVersionTest', 'FactGetHostTimelineTest']

View File

@ -66,8 +66,8 @@ class Command(NoArgsCommand):
def cleanup_ad_hoc_commands(self):
for ad_hoc_command in AdHocCommand.objects.all():
ad_hoc_command_display = '"%s" (started %s, %d events)' % \
(unicode(ad_hoc_command), unicode(ad_hoc_command.created),
ad_hoc_command.ad_hoc_command_events.count())
(unicode(ad_hoc_command), unicode(ad_hoc_command.created),
ad_hoc_command.ad_hoc_command_events.count())
if ad_hoc_command.status in ('pending', 'waiting', 'running'):
action_text = 'would skip' if self.dry_run else 'skipping'
self.logger.debug('%s %s ad hoc command %s', action_text, ad_hoc_command.status, ad_hoc_command_display)