From 0a9c99e00e311baba7ab3c40c5bb66c3c7ce39e9 Mon Sep 17 00:00:00 2001 From: Mike Bayer Date: Fri, 27 Jan 2006 00:33:54 +0000 Subject: [PATCH] task dump checks for None --- lib/sqlalchemy/mapping/objectstore.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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" -- 2.47.2