diff options
author | Dolph Mathews <dolph.mathews@gmail.com> | 2012-06-18 14:16:34 -0500 |
---|---|---|
committer | Dolph Mathews <dolph.mathews@gmail.com> | 2012-06-18 14:16:34 -0500 |
commit | 66a0b63dabffe4cb1d239be3ab68885e2f49f513 (patch) | |
tree | e88876f5dcfe6a6becfa5238d741a8279fc254c9 /keystone/openstack | |
parent | e33a4742a80a3535e071a17ce39815d29a95ca61 (diff) | |
download | keystone-66a0b63dabffe4cb1d239be3ab68885e2f49f513.tar.gz keystone-66a0b63dabffe4cb1d239be3ab68885e2f49f513.tar.xz keystone-66a0b63dabffe4cb1d239be3ab68885e2f49f513.zip |
PEP8 fixes
Change-Id: I0989396691eb31d9008c016e64f2c197f8c7e48c
Diffstat (limited to 'keystone/openstack')
-rw-r--r-- | keystone/openstack/common/cfg.py | 33 | ||||
-rw-r--r-- | keystone/openstack/common/importutils.py | 2 | ||||
-rw-r--r-- | keystone/openstack/common/setup.py | 2 |
3 files changed, 18 insertions, 19 deletions
diff --git a/keystone/openstack/common/cfg.py b/keystone/openstack/common/cfg.py index f272b2a1..899a6c46 100644 --- a/keystone/openstack/common/cfg.py +++ b/keystone/openstack/common/cfg.py @@ -391,7 +391,7 @@ def _get_config_dirs(project=None): fix_path('~'), os.path.join('/etc', project) if project else None, '/etc' - ] + ] return filter(bool, cfg_dirs) @@ -592,10 +592,10 @@ class Opt(object): if group is not None: dest = group.name + '_' + dest kwargs.update({ - 'dest': dest, - 'metavar': self.metavar, - 'help': self.help, - }) + 'dest': dest, + 'metavar': self.metavar, + 'help': self.help, + }) return kwargs def _get_optparse_prefix(self, prefix, group): @@ -905,13 +905,13 @@ class ConfigOpts(collections.Mapping): self._oparser.disable_interspersed_args() self._config_opts = [ - MultiStrOpt('config-file', - default=default_config_files, - metavar='PATH', - help='Path to a config file to use. Multiple config ' - 'files can be specified, with values in later ' - 'files taking precedence. The default files ' - ' used are: %s' % (default_config_files, )), + MultiStrOpt('config-file', + default=default_config_files, + metavar='PATH', + help='Path to a config file to use. Multiple config ' + 'files can be specified, with values in later ' + 'files taking precedence. The default files ' + ' used are: %s' % (default_config_files, )), StrOpt('config-dir', metavar='DIR', help='Path to a config directory to pull *.conf ' @@ -921,7 +921,7 @@ class ConfigOpts(collections.Mapping): 'the file(s), if any, specified via --config-file, ' 'hence over-ridden options in the directory take ' 'precedence.'), - ] + ] self.register_cli_opts(self._config_opts) self.project = project @@ -1411,8 +1411,7 @@ class ConfigOpts(collections.Mapping): default, opt, override = [info[k] for k in sorted(info.keys())] if opt.required: - if (default is not None or - override is not None): + if (default is not None or override is not None): continue if self._get(opt.name, group) is None: @@ -1516,7 +1515,7 @@ class CommonConfigOpts(ConfigOpts): short='v', default=False, help='Print more verbose output'), - ] + ] logging_cli_opts = [ StrOpt('log-config', @@ -1550,7 +1549,7 @@ class CommonConfigOpts(ConfigOpts): StrOpt('syslog-log-facility', default='LOG_USER', help='syslog facility to receive log lines') - ] + ] def __init__(self): super(CommonConfigOpts, self).__init__() diff --git a/keystone/openstack/common/importutils.py b/keystone/openstack/common/importutils.py index 7654af5b..b507d22e 100644 --- a/keystone/openstack/common/importutils.py +++ b/keystone/openstack/common/importutils.py @@ -30,7 +30,7 @@ def import_class(import_str): return getattr(sys.modules[mod_str], class_str) except (ImportError, ValueError, AttributeError), exc: raise ImportError('Class %s cannot be found (%s)' % - (class_str, str(exc))) + (class_str, str(exc))) def import_object(import_str, *args, **kwargs): diff --git a/keystone/openstack/common/setup.py b/keystone/openstack/common/setup.py index c219152a..09f71a37 100644 --- a/keystone/openstack/common/setup.py +++ b/keystone/openstack/common/setup.py @@ -32,7 +32,7 @@ def parse_mailmap(mailmap='.mailmap'): l = l.strip() if not l.startswith('#') and ' ' in l: canonical_email, alias = [x for x in l.split(' ') - if x.startswith('<')] + if x.startswith('<')] mapping[alias] = canonical_email return mapping |