On Tue, Jul 8, 2008 at 12:39 PM, Morten Siebuhr <[EMAIL PROTECTED]> wrote: > Hey 'yall, > > I'm trying to catch some errors from the DB in my application - but I > get the underlying DB's error directly, so I get different errors > depending on what DB I run on. Is there a way to catch these in some > generic way, while I will still be able to return a reasonable message > to the user? > > i.e.: > try: > storm.this() > storm.that() > storm.commit() > except SomeGenericStormError, e: > print "Could not bla bla bla: %s" % e > storm.rollback() > > > And while playing around with LDAP/AD, it struck me that Storm actually > fits quite nicely with a lot of common LDAP uses; AFAIK, you usually > have a sub-tree for users, another for groups, then computers, DNS, > etc., and it would be quite nice to package these in Storm classes. Is > this possible at all, or is Storm tied too closely to SQL? > > On a related note: does anybody know of *any* Python ORM for LDAP?
Remember that the "R" stands for "relational" :-) One could possibly argue that an LDAP directory is almost an object database. If you allow for that, then any API for LDAP is kind of like an ORM API for a relational database... The python-ldap lib is the one that I've used most. It has always suited my needs completely. Have you looked at it at all? http://python-ldap.sourceforge.net/docs.shtml That being said, I think your idea is still pretty cool: an LDAP python API that reflected the storm API... it sure would make LDAP programming in python more enjoyable :-) d -- storm mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/storm
