You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ro...@apache.org on 2021/09/08 04:42:38 UTC
[cloudstack] branch main updated: marvin: fix exception logging
(#5401)
This is an automated email from the ASF dual-hosted git repository.
rohit pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/main by this push:
new 10c49a6 marvin: fix exception logging (#5401)
10c49a6 is described below
commit 10c49a6ad37748fd8c7bd68bee70bb39212cee81
Author: Abhishek Kumar <ab...@gmail.com>
AuthorDate: Wed Sep 8 10:12:05 2021 +0530
marvin: fix exception logging (#5401)
Fixes #5203
Signed-off-by: Abhishek Kumar <ab...@gmail.com>
---
tools/marvin/marvin/cloudstackException.py | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/tools/marvin/marvin/cloudstackException.py b/tools/marvin/marvin/cloudstackException.py
index 2738cfb..57f9b03 100644
--- a/tools/marvin/marvin/cloudstackException.py
+++ b/tools/marvin/marvin/cloudstackException.py
@@ -58,7 +58,12 @@ class internalError(Exception):
def GetDetailExceptionInfo(e):
if e is not None:
- exc_type, exc_value, exc_traceback = sys.exc_info()
+ if type(e) is str:
+ return e
+ elif type(e) is tuple:
+ (exc_type, exc_value, exc_traceback) = e
+ else:
+ exc_type, exc_value, exc_traceback = sys.exc_info()
return str(repr(traceback.format_exception(
exc_type, exc_value, exc_traceback)))
else: