From 12eac496aa07ad136f2946e5d29a77348ec6f2a4 Mon Sep 17 00:00:00 2001 From: parmentelat Date: Thu, 13 Dec 2018 10:28:02 +0100 Subject: [PATCH] autopep8 --- bin/plc-config-tty | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/bin/plc-config-tty b/bin/plc-config-tty index 89bcf06..a8d8dea 100755 --- a/bin/plc-config-tty +++ b/bin/plc-config-tty @@ -2,15 +2,19 @@ import sys import readline + import plc_config + def validator(validated_variables): maint_user = validated_variables["PLC_API_MAINTENANCE_USER"] root_user = validated_variables["PLC_ROOT_USER"] if maint_user == root_user: - errStr="PLC_API_MAINTENANCE_USER=%s cannot be the same as PLC_ROOT_USER=%s"%(maint_user,root_user) + errStr = "PLC_API_MAINTENANCE_USER=%s cannot be the same as PLC_ROOT_USER=%s" % ( + maint_user, root_user) raise plc_config.ConfigurationException(errStr) + usual_variables = [ "PLC_NAME", "PLC_SHORTNAME", @@ -26,18 +30,18 @@ usual_variables = [ "PLC_BOOT_HOST", "PLC_NET_DNS1", "PLC_NET_DNS2", - ] +] -configuration={ \ - 'name':'plc', - 'service':"plc", - 'usual_variables':usual_variables, - 'config_dir':"/etc/planetlab", - 'validate_variables':{"PLC_API":"MAINTENANCE_USER","PLC":"ROOT_USER"}, - 'validator':validator, - } +configuration = { + 'name': 'plc', + 'service': "plc", + 'usual_variables': usual_variables, + 'config_dir': "/etc/planetlab", + 'validate_variables': {"PLC_API": "MAINTENANCE_USER", "PLC": "ROOT_USER"}, + 'validator': validator, +} if __name__ == '__main__': - command=sys.argv[0] + command = sys.argv[0] argv = sys.argv[1:] - plc_config.main(command,argv,configuration) + plc_config.main(command, argv, configuration) -- 2.43.0