summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKotresh HR <khiremat@redhat.com>2019-11-13 13:48:28 +0530
committerSunny Kumar <sunkumar@redhat.com>2019-11-13 12:16:57 +0000
commit9a8f8b057415c362485d747c97d4491e80f65a23 (patch)
tree2ab2a2597f10fa127cf5bda7d7a9bb17edf917ea
parente82cd7654a8c2faf46e1c553c7f8c251dff7002c (diff)
geo-rep: Improve debugging
When gsyncd failed with tracebacks during start, it prints only exception object but not the error string. This patch adds the error string as well. Earlier: "failed with ImportError" Now: "failed with ImportError: No module named _io." fixes: bz#1771895 Change-Id: I0d772a250d4c2010a0c35053aa7b165b71f8434e Signed-off-by: Kotresh HR <khiremat@redhat.com>
-rw-r--r--geo-replication/syncdaemon/syncdutils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py
index 8e78313..4b6f4a2 100644
--- a/geo-replication/syncdaemon/syncdutils.py
+++ b/geo-replication/syncdaemon/syncdutils.py
@@ -335,7 +335,7 @@ def log_raise_exception(excont):
logtag = "FULL EXCEPTION TRACE"
if logtag:
logging.exception(logtag + ": ")
- sys.stderr.write("failed with %s.\n" % type(exc).__name__)
+ sys.stderr.write("failed with %s: %s.\n" % (type(exc).__name__, exc))
excont.exval = 1
sys.exit(excont.exval)