backend/satellite_tools/satsync.py | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit dd2b5398a0e1c18ee497199867957610fb93d3fc
Author: Michael Mraka <michael.mraka(a)redhat.com>
Date: Tue Sep 1 14:55:59 2009 +0200
494813 - print meaninful error message instead of traceback when database is not
running
diff --git a/backend/satellite_tools/satsync.py b/backend/satellite_tools/satsync.py
index 40458ad..cbc6ece 100644
--- a/backend/satellite_tools/satsync.py
+++ b/backend/satellite_tools/satsync.py
@@ -2182,10 +2182,8 @@ def processCommandline():
rhnSQL.initDB(CFG.DEFAULT_DB)
except (SQLError, SQLSchemaError, SQLConnectError), e:
# An SQL error is fatal... crash and burn
- tbOut = cStringIO.StringIO()
- Traceback(mail=0, ostream=tbOut, with_locals=1)
- log(-1, 'SQL ERROR during xml processing: %s' % e, stream=sys.stderr)
- log(-1, 'TRACEBACK: %s' % tbOut.getvalue(), stream=sys.stderr)
+ log(-1, "ERROR: Can't connect to the database: %s" % e,
stream=sys.stderr)
+ log(-1, "ERROR: Check if your database is running.",
stream=sys.stderr)
sys.exit(20)
# check the validity of the debug level
Show replies by date