From 9a8f8b057415c362485d747c97d4491e80f65a23 Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Wed, 13 Nov 2019 13:48:28 +0530 Subject: 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 --- geo-replication/syncdaemon/syncdutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index 8e783136318..4b6f4a265f6 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) -- cgit