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?

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to