Removed trace prints
authorMikko Värri <vmj@linuxbox.fi>
Tue, 2 Feb 2010 00:52:48 +0000 (02:52 +0200)
committerMikko Värri <vmj@linuxbox.fi>
Tue, 2 Feb 2010 00:52:48 +0000 (02:52 +0200)
recycloid_models/models.py

index 9d1e028..bb03c3c 100644 (file)
@@ -197,22 +197,15 @@ def on__user__post_save(sender, *args, **kwargs):
     Creates a corresponding Recycloid StashOwner when User is
     created.
     """
-    print "on__user__post_save"
     if kwargs.get('created', False):
-        print " - new User created"
         user = kwargs.get('instance', None)
         if user:
-            print " - Creating Recycloid StashOwner"
             try:
                 server = StashServer.objects.current()
                 owner = StashOwner.objects.create(user=user, server=server)
                 owner.save()
             except:
-                print " - FAILED: Recycloid StashServer not yet created"
-        else:
-            print " - No instance"
-    else:
-        print " - User only modified"
+                pass
 
 post_save.connect(on__user__post_save, sender=User,
                   dispatch_uid="recycloid_models.models.on__user__post_save")
@@ -224,18 +217,11 @@ def on__stash_item__post_save(sender, *args, **kwargs):
     Increments the item_count in related Stash, if an StashItem
     was created.
     """
-    print "on__stash_item__post_save"
     if kwargs.get('created', False):
-        print " - new StashItem created"
         item = kwargs.get('instance', None)
         if item:
-            print " - Increasing count in Stash"
             item.stash.item_count = item.stash.item_count + 1
             item.stash.save()
-        else:
-            print " - No instance"
-    else:
-        print " - StashItem only modified"
 
 post_save.connect(on__stash_item__post_save, sender=StashItem,
                   dispatch_uid="recycloid_models.models.on__stash_item__post_save")
@@ -246,14 +232,10 @@ def on__stash_item__pre_delete(sender, *args, **kwargs):
 
     Decrements the item_count in related Stash.
     """
-    print "on__stash_item__pre_delete"
     item = kwargs.get('instance', None)
     if item:
-        print " - Decreasing count in Stash"
         item.stash.item_count = item.stash.item_count - 1
         item.stash.save()
-    else:
-        print " - No instance"
 
 pre_delete.connect(on__stash_item__pre_delete, sender=StashItem,
                    dispatch_uid="recycloid_models.models.on__stash_item__pre_delete")