mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[mod] uses builtin function to show traceback
This commit is contained in:
parent
28b44401f5
commit
57665b6f11
1 changed files with 6 additions and 5 deletions
|
@ -302,14 +302,15 @@ def _migrate_from_md5_tsig_to_sha512_tsig(private_key_path, domain, dyn_host):
|
||||||
if r.status_code != 201:
|
if r.status_code != 201:
|
||||||
try:
|
try:
|
||||||
error = json.loads(r.text)['error']
|
error = json.loads(r.text)['error']
|
||||||
except Exception as e:
|
show_traceback = 0
|
||||||
import traceback
|
except Exception:
|
||||||
traceback.print_exc()
|
# failed to decode json
|
||||||
print e
|
|
||||||
error = r.text
|
error = r.text
|
||||||
|
show_traceback = 1
|
||||||
|
|
||||||
logger.warning(m18n.n('migrate_tsig_failed', domain=domain,
|
logger.warning(m18n.n('migrate_tsig_failed', domain=domain,
|
||||||
error_code=str(r.status_code), error=error))
|
error_code=str(r.status_code), error=error),
|
||||||
|
exc_info=show_traceback)
|
||||||
|
|
||||||
os.system("mv /etc/yunohost/dyndns/*+165* /tmp")
|
os.system("mv /etc/yunohost/dyndns/*+165* /tmp")
|
||||||
return public_key_path
|
return public_key_path
|
||||||
|
|
Loading…
Add table
Reference in a new issue