]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
task dump checks for None
authorMike Bayer <mike_mp@zzzcomputing.com>
Fri, 27 Jan 2006 00:33:54 +0000 (00:33 +0000)
committerMike Bayer <mike_mp@zzzcomputing.com>
Fri, 27 Jan 2006 00:33:54 +0000 (00:33 +0000)
lib/sqlalchemy/mapping/objectstore.py

index 5f48b4d600813ae02d38454bc3c3ab2eaea44efa..8c2366690115f5d9c6d51898d30f1a48080856db 100644 (file)
@@ -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"