don't repeat yourself and give the bsddb exception an identity.
This commit is contained in:
+1
-5
@@ -80,11 +80,7 @@ class DBShelf:
|
|||||||
retval = proc(autotxn)
|
retval = proc(autotxn)
|
||||||
except db.DBError, e:
|
except db.DBError, e:
|
||||||
autotxn.abort()
|
autotxn.abort()
|
||||||
raise e
|
raise pisi.Error, e
|
||||||
except Exception, e:
|
|
||||||
autotxn.abort()
|
|
||||||
#e.args += tuple(traceback.format_tb(sys.exc_traceback))
|
|
||||||
raise e
|
|
||||||
autotxn.commit()
|
autotxn.commit()
|
||||||
else: # execute without transactions
|
else: # execute without transactions
|
||||||
retval = proc(None)
|
retval = proc(None)
|
||||||
|
|||||||
Reference in New Issue
Block a user