portageq get_repo_path: output empty if unknown v2.2.0_alpha43
authorZac Medico <zmedico@gentoo.org>
Fri, 1 Jul 2011 13:27:27 +0000 (06:27 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 1 Jul 2011 13:27:27 +0000 (06:27 -0700)
It used to output "None" for unknown repos, which was not intended.

bin/portageq

index a13ca998c102a74792a3d9c05369d6e3f4791348..f0ecbfcd13ea79a66ee44954d3f722d2cf1f71df 100755 (executable)
@@ -627,7 +627,10 @@ def get_repo_path(argv):
                print("ERROR: insufficient parameters!")
                sys.exit(2)
        for arg in argv[1:]:
-               print(portage.db[argv[0]]["porttree"].dbapi.getRepositoryPath(arg))
+               path = portage.db[argv[0]]["porttree"].dbapi.getRepositoryPath(arg)
+               if path is None:
+                       path = ""
+               print(path)
 
 def list_preserved_libs(argv):
        """<root>