projects
/
skytools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c55f9c
)
qadmin: catch and show python exceptions
author
Marko Kreen
<markokr@gmail.com>
Wed, 8 Dec 2010 13:59:04 +0000
(15:59 +0200)
committer
Marko Kreen
<markokr@gmail.com>
Wed, 8 Dec 2010 13:59:04 +0000
(15:59 +0200)
python/qadmin.py
patch
|
blob
|
blame
|
history
diff --git
a/python/qadmin.py
b/python/qadmin.py
index 6be44d0cf25a397d98e75fae4c7c3372c4c6c29f..ed9d7fc2ab6b16ba0f6f2ceaf1821850eec97198 100755
(executable)
--- a/
python/qadmin.py
+++ b/
python/qadmin.py
@@
-96,7
+96,7
@@
General options:
--version
'''
-import sys, os, readline, getopt, re, psycopg2
+import sys, os, readline, getopt, re, psycopg2
, traceback
import pkgloader
pkgloader.require('skytools', '3.0')
@@
-864,6
+864,7
@@
class AdminConsole:
try:
ln = self.line_input()
self.exec_string(ln)
+ raise Exception('exctest')
except KeyboardInterrupt:
print
except EOFError:
@@
-871,6
+872,8
@@
class AdminConsole:
break
except psycopg2.Error, d:
print 'ERROR:', str(d).strip()
+ except Exception:
+ traceback.print_exc()
self.reset_comp_cache()
try: