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:
|
||||
try:
|
||||
error = json.loads(r.text)['error']
|
||||
except Exception as e:
|
||||
import traceback
|
||||
traceback.print_exc()
|
||||
print e
|
||||
show_traceback = 0
|
||||
except Exception:
|
||||
# failed to decode json
|
||||
error = r.text
|
||||
show_traceback = 1
|
||||
|
||||
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")
|
||||
return public_key_path
|
||||
|
|
Loading…
Add table
Reference in a new issue