Split up long line for PEP8

This commit is contained in:
AndrewCz 2019-03-28 14:07:15 -04:00 committed by GitHub
parent 43c118251d
commit 7317ebdd23
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,8 @@ for setting in ldapcherry_ini_settings:
# We also know that it isn't defined anywhere due to the earlier test.
indeces = [idx for idx, elem in enumerate(filelines)
if elem.startswith("#" + setting_key)]
filelines[indeces[0]] = "{0} = '{1}'\n".format(setting_key, setting_val)
filelines[indeces[0]] = "{0} = '{1}'\n".format(setting_key,
setting_val)
else:
# It is not defined anywhere
continue
@ -84,4 +85,4 @@ with open('/etc/ldapcherry/ldapcherry.ini', 'w') as file:
for fileline in filelines:
file.write("{}".format(fileline))
os.system("/usr/local/bin/ldapcherryd -c /etc/ldapcherry/ldapcherry.ini -D")
os.system("/usr/local/bin/ldapcherryd -c /etc/ldapcherry/ldapcherry.ini")