summaryrefslogtreecommitdiffstats
path: root/base/common/python/pki/cli.py
diff options
context:
space:
mode:
authorChristian Heimes <cheimes@redhat.com>2015-08-11 20:55:48 +0200
committerChristian Heimes <cheimes@redhat.com>2015-08-14 13:03:18 +0200
commit12badcabc1cd345256a4902f7b0583cf667ecd8d (patch)
treed0a45d096fab9c0b14d5221557a616824ecfd24a /base/common/python/pki/cli.py
parentd63ade55f5cc2a9ecf21ea2b43cfac80149c4c29 (diff)
downloadpki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.gz
pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.tar.xz
pki-12badcabc1cd345256a4902f7b0583cf667ecd8d.zip
Make pki PEP 8 compatible
Large portions of the patch was automatically created with autopep8: find base/ -name '*.py' | xargs autopep8 --in-place --ignore E309 \ --aggressive find base/common/upgrade base/server/upgrade -type f -and \ -not -name .gitignore | autopep8 --in-place --ignore E309 --aggressive autopep8 --in-place --ignore E309 --aggressive \ base/common/sbin/pki-upgrade \ base/server/sbin/pkispawn \ base/server/sbin/pkidestroy \ base/server/sbin/pki-server \ base/server/sbin/pki-server-upgrade About two dozent violations were fixed manually. https://fedorahosted.org/pki/ticket/708
Diffstat (limited to 'base/common/python/pki/cli.py')
-rw-r--r--base/common/python/pki/cli.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/base/common/python/pki/cli.py b/base/common/python/pki/cli.py
index 4379780b2..12b8656e8 100644
--- a/base/common/python/pki/cli.py
+++ b/base/common/python/pki/cli.py
@@ -99,7 +99,8 @@ class CLI(object):
sub_command = None
# Search the module by incrementally adding parts into module name.
- # Repeat until it finds the module or until there is no more parts to add.
+ # Repeat until it finds the module or until there is no more parts to
+ # add.
module = None
position = 0
@@ -110,7 +111,7 @@ class CLI(object):
if i >= 0:
# Dash found. Split command into module name and sub command.
module_name = command[0:i]
- sub_command = command[i+1:]
+ sub_command = command[i + 1:]
else:
# Dash not found. Use the whole command.
module_name = command
@@ -127,7 +128,8 @@ class CLI(object):
module = m
break
- # There is a sub command. It must be processed by module's children.
+ # There is a sub command. It must be processed by module's
+ # children.
if len(m.modules) > 0:
# Module has children. Use this module.
module = m
@@ -153,7 +155,8 @@ class CLI(object):
# Prepare module arguments.
if sub_command:
- # If module command exists, include it as arguments: <module command> <args>...
+ # If module command exists, include it as arguments:
+ # <module command> <args>...
module_args = [sub_command] + args[1:]
else: