From 7ecddcfa70f10a7b7018dc224cf48c9c279f6e57 Mon Sep 17 00:00:00 2001 From: Chris Meyers Date: Mon, 13 Apr 2015 11:53:27 -0400 Subject: [PATCH] flake8 --- awx/main/management/commands/cleanup_facts.py | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/awx/main/management/commands/cleanup_facts.py b/awx/main/management/commands/cleanup_facts.py index ad1028f9bf..cd427f082a 100644 --- a/awx/main/management/commands/cleanup_facts.py +++ b/awx/main/management/commands/cleanup_facts.py @@ -4,10 +4,8 @@ # Python import re from dateutil.relativedelta import relativedelta -import logging -from datetime import datetime, timedelta +from datetime import datetime from optparse import make_option -from dateutil.relativedelta import relativedelta # Django from django.core.management.base import BaseCommand, CommandError @@ -19,8 +17,6 @@ from awx.fact.models.fact import * # noqa OLDER_THAN = 'older_than' GRANULARITY = 'granularity' -logger = logging.getLogger('awx.main.commands.cleanup_facts') - class CleanupFacts(object): def __init__(self): self.timestamp = None @@ -121,9 +117,9 @@ class Command(BaseCommand): older_than = self.string_time_to_timestamp(options[OLDER_THAN]) granularity = self.string_time_to_timestamp(options[GRANULARITY]) - if older_than == None: + if older_than is None: raise CommandError('--older_than invalid value "%s"' % options[OLDER_THAN]) - if granularity == None: + if granularity is None: raise CommandError('--granularity invalid value "%s"' % options[GRANULARITY]) cleanup_facts.run(older_than, granularity)