[fix] Detect un declared success uo

This commit is contained in:
ljf 2018-06-05 00:58:41 +02:00
parent 9eee035a8d
commit 5dbf7b567e

View file

@ -251,9 +251,8 @@ def is_unit_operation(entities='app,domain,service,user', exclude='auth,password
except Exception as e: except Exception as e:
uo.error(e) uo.error(e)
raise e raise e
finally: else:
# Close the unit operation if it hasn't been closed before uo.success()
uo.close(exc_info()[0])
return result return result
return func_wrapper return func_wrapper
return decorate return decorate