catch dbi.program-error ?
Brian Herbert Withun
bhwithun at gmail.com
Thu Nov 17 13:56:23 EST 2005
I'm having difficulty catching dbi.program-error which occurs this way:
import dbi, odbc
[...]
self.__cur.execute(sql)
>>> dbi.program-error: [Sybase][ODBC Driver][Adaptive Server Anywhere]Table 'depfile' not found in EXEC
but
try:
self.__cur.execute(sql)
except dbi.program-error,e:
print " caught "
raise
causes
>>> except dbi.program-error, e:
>>> AttributeError: 'module' object has no attribute 'program'
What, in general, is the offender here? The hyphen in
"dbi.program-error" or the dot?
More information about the Python-list
mailing list