diff options
author | Zac Medico <zmedico@gentoo.org> | 2009-11-06 02:56:32 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2009-11-06 02:56:32 +0000 |
commit | 883f1ba5971f6b62b66ac3e06caff47c10b0b786 (patch) | |
tree | 17c9172936f1c8b907e0d4193ad2944937609c61 | |
parent | 8e7396755ee162fe98f005e8729595c81a57795c (diff) | |
download | portage-883f1ba5971f6b62b66ac3e06caff47c10b0b786.tar.gz portage-883f1ba5971f6b62b66ac3e06caff47c10b0b786.tar.bz2 portage-883f1ba5971f6b62b66ac3e06caff47c10b0b786.zip |
Use writemsg instead of print, to send debug messages to stderr.
svn path=/main/trunk/; revision=14779
-rw-r--r-- | pym/_emerge/depgraph.py | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/pym/_emerge/depgraph.py b/pym/_emerge/depgraph.py index e5cb10f7b..b78726258 100644 --- a/pym/_emerge/depgraph.py +++ b/pym/_emerge/depgraph.py @@ -1193,10 +1193,12 @@ class depgraph(object): strict = pkg.type_name != "installed" if debug: - print() - print("Parent: ", pkg) - 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: selected_atoms = self._select_atoms(dep_root, @@ -1210,7 +1212,9 @@ class depgraph(object): return 0 if debug: - print("Candidates:", [str(x) for x in selected_atoms[pkg]]) + writemsg_level("Candidates: %s\n" % \ + ([str(x) for x in selected_atoms[pkg]],), + noiselevel=-1, level=logging.DEBUG) root_config = self._frozen_config.roots[dep_root] vardb = root_config.trees["vartree"].dbapi @@ -1238,8 +1242,9 @@ class depgraph(object): for virt_pkg, atoms in selected_atoms.items(): if debug: - print("Candidates: %s: %s" % \ - (virt_pkg.cpv, [str(x) for x in atoms])) + writemsg_level("Candidates: %s: %s\n" % \ + (virt_pkg.cpv, [str(x) for x in atoms]), + noiselevel=-1, level=logging.DEBUG) # Just assume depth + 1 here for now, though it's not entirely # accurate since multilple levels of indirect virtual deps may |