mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[fix] Collect the last error for uo log
This commit is contained in:
parent
f64f0acb5b
commit
9eee035a8d
1 changed files with 3 additions and 0 deletions
|
@ -248,6 +248,9 @@ def is_unit_operation(entities='app,domain,service,user', exclude='auth,password
|
||||||
if not auto:
|
if not auto:
|
||||||
args = (uo,) + args
|
args = (uo,) + args
|
||||||
result = func(*args, **kwargs)
|
result = func(*args, **kwargs)
|
||||||
|
except Exception as e:
|
||||||
|
uo.error(e)
|
||||||
|
raise e
|
||||||
finally:
|
finally:
|
||||||
# Close the unit operation if it hasn't been closed before
|
# Close the unit operation if it hasn't been closed before
|
||||||
uo.close(exc_info()[0])
|
uo.close(exc_info()[0])
|
||||||
|
|
Loading…
Add table
Reference in a new issue