Hi,
On 19-06-2012 01:13, Peter Pöml wrote:
.....
Here I have a suggestion for cosmetic improvement:
To avoid importing the sqlobject namespace both in its own namespace (which you
added) as well as with * into the current namespace (as was already present),
we could stick to the existing and write the addition as this:
--- mb/mb/conn.py (revision 8294)
+++ mb/mb/conn.py (working copy)
@@ -188,7 +188,7 @@
fromDatabase = True
defaultOrder = 'asn'
self.Pfx2asn = Pfx2asn
- except psycopg2.ProgrammingError:
+ except (dberrors.ProgrammingError, psycopg2.ProgrammingError):
# this is the error which we get if mod_asn doesn't happen
# to be installed as well
pass
It should yield the same result. Alright?
Of course there is no change in functionality.
I wanted to make it crystal clear that there are two possible
ProgrammingError's, one from psycopg2 one from sqlobject; so I added the
import line to include full path for sqlobject's version.
Thank you very much for the patch. I believe that somebody ran into this bug
recently.
np. It's only a small one, more will come.
I hope that dberrors.ProgrammingError exists in older versions as well, but
we'll see :-)
I checked sqlobject's history, sqlobject/dberrors.py has only the inital
commit, in 2006.
--
Gökdeniz Karadağ
_______________________________________________
mirrorbrain mailing list
Archive: http://mirrorbrain.org/archive/mirrorbrain/
Note: To remove yourself from this mailing list, send a mail with the content
unsubscribe
to the address mirrorbrain-requ...@mirrorbrain.org