From 9eee035a8d7d96c1454ccd5c4d7a89903d0780a3 Mon Sep 17 00:00:00 2001 From: ljf Date: Tue, 5 Jun 2018 00:32:28 +0200 Subject: [PATCH] [fix] Collect the last error for uo log --- src/yunohost/log.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/yunohost/log.py b/src/yunohost/log.py index 77f20795a..440a454fb 100644 --- a/src/yunohost/log.py +++ b/src/yunohost/log.py @@ -248,6 +248,9 @@ def is_unit_operation(entities='app,domain,service,user', exclude='auth,password if not auto: args = (uo,) + args result = func(*args, **kwargs) + except Exception as e: + uo.error(e) + raise e finally: # Close the unit operation if it hasn't been closed before uo.close(exc_info()[0])