don't repeat yourself and give the bsddb exception an identity.

This commit is contained in:
Barış Metin
2006-10-10 10:43:19 +00:00
parent 066f35063b
commit 2ecfdc214b
+1 -5
View File
@@ -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)