From: Mike Bayer Date: Fri, 27 Jan 2006 00:33:54 +0000 (+0000) Subject: task dump checks for None X-Git-Tag: rel_0_1_0~102 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a9c99e00e311baba7ab3c40c5bb66c3c7ce39e9;p=thirdparty%2Fsqlalchemy%2Fsqlalchemy.git task dump checks for None --- diff --git a/lib/sqlalchemy/mapping/objectstore.py b/lib/sqlalchemy/mapping/objectstore.py index 5f48b4d600..8c23666901 100644 --- a/lib/sqlalchemy/mapping/objectstore.py +++ b/lib/sqlalchemy/mapping/objectstore.py @@ -391,11 +391,15 @@ class UOWTransaction(object): head = self._sort_dependencies() if LOG or echo: - print "Task dump:\n" + head.dump() + if head is None: + print "Task dump: None" + else: + print "Task dump:\n" + head.dump() if head is not None: head.execute(self) if LOG or echo: - print "\nAfter Execute:\n" + head.dump() + if head is not None: + print "\nAfter Execute:\n" + head.dump() def post_exec(self): """after an execute/commit is completed, all of the objects and lists that have @@ -415,8 +419,8 @@ class UOWTransaction(object): except KeyError: pass - # this assertion only applies to a full commit(), not a - # partial one + # this assertion only applies to a full commit(), not a + # partial one #if len(self.uow.new) > 0 or len(self.uow.dirty) >0 or len(self.uow.modified_lists) > 0: # raise "assertion failed"