From 12badcabc1cd345256a4902f7b0583cf667ecd8d Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 11 Aug 2015 20:55:48 +0200 Subject: 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 --- base/common/python/pki/cli.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'base/common/python/pki/cli.py') 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: ... + # If module command exists, include it as arguments: + # ... module_args = [sub_command] + args[1:] else: -- cgit