[mod] unused variables

This commit is contained in:
Laurent Peuch 2018-12-16 03:18:25 +01:00
parent b68c358023
commit 25d81e25ad

View file

@ -150,7 +150,7 @@ def tools_adminpw(auth, new_password, check_strength=True):
with open('/etc/shadow', 'w') as after_file: with open('/etc/shadow', 'w') as after_file:
after_file.write(before.replace("root:" + hash_root, after_file.write(before.replace("root:" + hash_root,
"root:" + new_hash.replace('{CRYPT}', ''))) "root:" + new_hash.replace('{CRYPT}', '')))
except IOError as e: except IOError:
logger.warning(m18n.n('root_password_desynchronized')) logger.warning(m18n.n('root_password_desynchronized'))
return return
@ -206,7 +206,7 @@ def tools_maindomain(operation_logger, auth, new_domain=None):
# Regen configurations # Regen configurations
try: try:
with open('/etc/yunohost/installed', 'r') as f: with open('/etc/yunohost/installed', 'r'):
service_regen_conf() service_regen_conf()
except IOError: except IOError:
pass pass