Use writemsg instead of print, to send debug messages to stderr.
authorZac Medico <zmedico@gentoo.org>
Fri, 6 Nov 2009 23:26:32 +0000 (23:26 -0000)
committerZac Medico <zmedico@gentoo.org>
Fri, 6 Nov 2009 23:26:32 +0000 (23:26 -0000)
svn path=/main/trunk/; revision=14784

pym/_emerge/depgraph.py

index 2ff345da653ce022d83e6fdc450a174590db7b4e..e8c4514df6a985b3865bf05de3aa33079aa3fd6d 100644 (file)
@@ -1133,10 +1133,12 @@ class depgraph(object):
                                if not dep_string:
                                        continue
                                if debug:
-                                       print()
-                                       print("Parent:   ", jbigkey)
-                                       print("Depstring:", dep_string)
-                                       print("Priority:", dep_priority)
+                                       writemsg_level("\nParent:    %s\n" % (pkg,),
+                                               noiselevel=-1, level=logging.DEBUG)
+                                       writemsg_level("Depstring: %s\n" % (dep_string,),
+                                               noiselevel=-1, level=logging.DEBUG)
+                                       writemsg_level("Priority:  %s\n" % (dep_priority,),
+                                               noiselevel=-1, level=logging.DEBUG)
 
                                try:
 
@@ -1272,7 +1274,8 @@ class depgraph(object):
                                        return 0
 
                if debug:
-                       print("Exiting...", pkg)
+                       writemsg_level("Exiting... %s\n" % (pkg,),
+                               noiselevel=-1, level=logging.DEBUG)
 
                return 1