mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
logger.exception -> logger.error because logger.exception displays a stacktrace and it ain't relevant in any of these cases
This commit is contained in:
parent
071d8c4cbe
commit
10ba00affe
3 changed files with 8 additions and 8 deletions
|
@ -2171,7 +2171,7 @@ def _get_git_last_commit_hash(repository, reference='HEAD'):
|
||||||
.format(repository, reference)
|
.format(repository, reference)
|
||||||
commit = check_output(cmd)
|
commit = check_output(cmd)
|
||||||
except subprocess.CalledProcessError:
|
except subprocess.CalledProcessError:
|
||||||
logger.exception("unable to get last commit from %s", repository)
|
logger.error("unable to get last commit from %s", repository)
|
||||||
raise ValueError("Unable to get last commit with git")
|
raise ValueError("Unable to get last commit with git")
|
||||||
else:
|
else:
|
||||||
return commit.strip()
|
return commit.strip()
|
||||||
|
|
|
@ -703,7 +703,7 @@ class BackupManager():
|
||||||
except:
|
except:
|
||||||
abs_tmp_app_dir = os.path.join(self.work_dir, 'apps/', app)
|
abs_tmp_app_dir = os.path.join(self.work_dir, 'apps/', app)
|
||||||
shutil.rmtree(abs_tmp_app_dir, ignore_errors=True)
|
shutil.rmtree(abs_tmp_app_dir, ignore_errors=True)
|
||||||
logger.exception(m18n.n('backup_app_failed', app=app))
|
logger.error(m18n.n('backup_app_failed', app=app))
|
||||||
self.targets.set_result("apps", app, "Error")
|
self.targets.set_result("apps", app, "Error")
|
||||||
else:
|
else:
|
||||||
# Add app info
|
# Add app info
|
||||||
|
@ -945,7 +945,7 @@ class RestoreManager():
|
||||||
if system_part not in self.info['system'] or\
|
if system_part not in self.info['system'] or\
|
||||||
'paths' not in self.info['system'][system_part] or\
|
'paths' not in self.info['system'][system_part] or\
|
||||||
len(self.info['system'][system_part]['paths']) == 0:
|
len(self.info['system'][system_part]['paths']) == 0:
|
||||||
logger.exception(m18n.n('restore_hook_unavailable', part=system_part))
|
logger.error(m18n.n('restore_hook_unavailable', part=system_part))
|
||||||
self.targets.set_result("system", system_part, "Skipped")
|
self.targets.set_result("system", system_part, "Skipped")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ class RestoreManager():
|
||||||
env=env_dict)[0]
|
env=env_dict)[0]
|
||||||
except:
|
except:
|
||||||
msg = m18n.n('restore_app_failed', app=app_instance_name)
|
msg = m18n.n('restore_app_failed', app=app_instance_name)
|
||||||
logger.exception(msg)
|
logger.error(msg)
|
||||||
operation_logger.error(msg)
|
operation_logger.error(msg)
|
||||||
|
|
||||||
if msettings.get('interface') != 'api':
|
if msettings.get('interface') != 'api':
|
||||||
|
|
|
@ -148,7 +148,7 @@ def tools_adminpw(new_password, check_strength=True):
|
||||||
try:
|
try:
|
||||||
ldap.update("cn=admin", {"userPassword": [new_hash], })
|
ldap.update("cn=admin", {"userPassword": [new_hash], })
|
||||||
except:
|
except:
|
||||||
logger.exception('unable to change admin password')
|
logger.error('unable to change admin password')
|
||||||
raise YunohostError('admin_password_change_failed')
|
raise YunohostError('admin_password_change_failed')
|
||||||
else:
|
else:
|
||||||
# Write as root password
|
# Write as root password
|
||||||
|
|
Loading…
Add table
Reference in a new issue