Re: Uh-oh! Driver-specific exceptions are not abstracted....

Jacob Smullyan <[email protected]> Tue, 16 Aug 2005 10:47:38 -0400
Newsgroups gmane.comp.web.skunkweb
Message-ID <[email protected]>
On Mon, Aug 15, 2005 at 11:25:23PM -0400, Jacob Smullyan wrote:
> At the moment, getDriverMod wouldn't be as straightforward as one
> might like; you need to get pydo.dbi._aliases[alias]['driver'] and
> then map it to the correct module.  I'll add code so that it isn't
> necessary to do anything so demeaning, but I'm not sure yet whether it
> should be a separate function, a dbi method, or a "dbapi_module"
> attribute of the dbi class/instance (which currently just has a
> reference to the connect function).

I've just checked in changes that add to the dbi object two new
attributes: "dbapiModule" and "exceptions".  You can guess what the
former is; the latter is a dictionary mapping class names to the
corresponding exception classes in the dbapi module.  

js


-- 
Jacob Smullyan
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFDAfyKuqamFyFXXLIRApMiAJ0aYxVvEipLkaWsFD3/wd6XaQnGbwCcDv5f
IA1vV9vqvXtqz+322l76nKM=
=9Hw3
-----END PGP SIGNATURE-----