From 0536a049a7c03c82d528590308e39cc9926cd58d Mon Sep 17 00:00:00 2001 From: Brian Dolbec Date: Sat, 22 Jun 2013 15:11:01 -0700 Subject: [PATCH] Some pyflakes cleanup and fix logger messages --- gkeyldap/cli.py | 11 +++++------ gkeyldap/search.py | 1 - 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/gkeyldap/cli.py b/gkeyldap/cli.py index d4971d0..ccc9159 100644 --- a/gkeyldap/cli.py +++ b/gkeyldap/cli.py @@ -2,7 +2,7 @@ from __future__ import print_function -import ldap + import sys import os import argparse @@ -10,8 +10,7 @@ import argparse from gkeys.log import logger from gkeys.config import GKeysConfig, GKEY from gkeys.seed import Seeds -from gkeyldap.search import (LdapSearch, UID, CN, STATUS, GPGKEY, - MAIL, GPGFINGERPRINT, gkey2ldap_map, gkey2SEARCH) +from gkeyldap.search import (LdapSearch, UID, gkey2ldap_map, gkey2SEARCH) # set debug level to max @@ -35,7 +34,6 @@ class Main(object): def __call__(self, args=None): - logger.debug("Main:__call__()") if args: self.run(self.parse_args(args)) else: @@ -97,6 +95,7 @@ class Main(object): func = getattr(self, '_action_%s' % args.action) logger.debug('Found action: %s' % args.action) results = func(args) + return results def _action_ldapsearch(self, args): @@ -111,7 +110,7 @@ class Main(object): for dev in sorted(devs): print(dev, devs[dev]) print("============================================") - print "Total number of devs in results:", len(devs) + print("Total number of devs in results:", len(devs)) return True @@ -134,7 +133,7 @@ class Main(object): if os.path.exists(self.config['dev-seedfile']): logger.debug("Renaming current seed file to: %s" % old) os.rename(self.config['dev-seedfile'], old) - logger.debug("Renaming 'new' seed file to: %s" % self.config['dev-seedfile']) + logger.debug("Renaming 'new' seed file to: %s" % self.config['dev-seedfile'])) os.rename(self.config['dev-seedfile'] + '.new', self.config['dev-seedfile']) except IOError: diff --git a/gkeyldap/search.py b/gkeyldap/search.py index f432dcf..66721f1 100644 --- a/gkeyldap/search.py +++ b/gkeyldap/search.py @@ -1,5 +1,4 @@ import ldap -import sys from gkeys.log import logger from gkeys.config import GKEY -- 2.26.2