From 5d02c6aaeb893bf382037d34dc67e6293365c702 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Thu, 4 Jan 2018 13:36:36 +0100 Subject: [PATCH] LGTM: Use explicit string concatenation Implicit string concatenation is technically correct, too. But when combined in list, it's confusing for both human eye and static code analysis. Signed-off-by: Christian Heimes Reviewed-By: Fraser Tweedale --- ipalib/plugable.py | 12 ++++++------ ipaserver/install/cainstance.py | 28 +++++++++++++++------------- 2 files changed, 21 insertions(+), 19 deletions(-) diff --git a/ipalib/plugable.py b/ipalib/plugable.py index b1fba368d..758b67cd7 100644 --- a/ipalib/plugable.py +++ b/ipalib/plugable.py @@ -532,15 +532,15 @@ class API(ReadOnly): formatter=IPAHelpFormatter(), usage='%prog [global-options] COMMAND [command-options]', description='Manage an IPA domain', - version=('VERSION: %s, API_VERSION: %s' - % (VERSION, API_VERSION)), + version=('VERSION: %s, API_VERSION: %s' % + (VERSION, API_VERSION)), epilog='\n'.join([ 'See "ipa help topics" for available help topics.', - 'See "ipa help " for more information on a ' - 'specific topic.', + 'See "ipa help " for more information on ' + + 'a specific topic.', 'See "ipa help commands" for the full list of commands.', - 'See "ipa --help" for more information on a ' - 'specific command.', + 'See "ipa --help" for more information on ' + + 'a specific command.', ])) parser.disable_interspersed_args() parser.add_option("-h", "--help", action="help", diff --git a/ipaserver/install/cainstance.py b/ipaserver/install/cainstance.py index 20bca078c..d2126a1b1 100644 --- a/ipaserver/install/cainstance.py +++ b/ipaserver/install/cainstance.py @@ -1541,12 +1541,14 @@ def ensure_entry(dn, **attrs): def configure_profiles_acl(): """Allow the Certificate Manager Agents group to modify profiles.""" new_rules = [ - 'certServer.profile.configuration:read,modify:allow (read,modify) ' - 'group="Certificate Manager Agents":' - 'Certificate Manager agents may modify (create/update/delete) and read profiles', + 'certServer.profile.configuration:read,modify' + + ':allow (read,modify) group="Certificate Manager Agents"' + + ':Certificate Manager agents may modify (create/update/delete) ' + + 'and read profiles', - 'certServer.ca.account:login,logout:allow (login,logout) ' - 'user="anybody":Anybody can login and logout', + 'certServer.ca.account:login,logout' + + ':allow (login,logout) user="anybody"' + + ':Anybody can login and logout', ] return __add_acls(new_rules) @@ -1554,20 +1556,20 @@ def configure_profiles_acl(): def configure_lightweight_ca_acls(): """Allow Certificate Manager Agents to manage lightweight CAs.""" new_rules = [ - 'certServer.ca.authorities:list,read' - ':allow (list,read) user="anybody"' + 'certServer.ca.authorities:list,read' + + ':allow (list,read) user="anybody"' + ':Anybody may list and read lightweight authorities', - 'certServer.ca.authorities:create,modify' - ':allow (create,modify) group="Administrators"' + 'certServer.ca.authorities:create,modify' + + ':allow (create,modify) group="Administrators"' + ':Administrators may create and modify lightweight authorities', - 'certServer.ca.authorities:delete' - ':allow (delete) group="Administrators"' + 'certServer.ca.authorities:delete' + + ':allow (delete) group="Administrators"' + ':Administrators may delete lightweight authorities', - 'certServer.ca.authorities:create,modify,delete' - ':allow (create,modify,delete) group="Certificate Manager Agents"' + 'certServer.ca.authorities:create,modify,delete' + + ':allow (create,modify,delete) group="Certificate Manager Agents"' + ':Certificate Manager Agents may manage lightweight authorities', ] return __add_acls(new_rules)