Catch InvalidData exceptions for bad atoms passed as emerge arguments.
authorZac Medico <zmedico@gentoo.org>
Sat, 13 Jan 2007 08:54:35 +0000 (08:54 -0000)
committerZac Medico <zmedico@gentoo.org>
Sat, 13 Jan 2007 08:54:35 +0000 (08:54 -0000)
svn path=/main/trunk/; revision=5629

bin/emerge

index e73e5e40ca580483bafb35092c44ea232aba436d..317ae4ef97207b44f58abd3aa956ba417eea197f 100755 (executable)
@@ -3578,7 +3578,10 @@ def chk_updated_cfg_files(target_root, config_protect):
                print
 
 def is_valid_package_atom(x):
-       testkey = portage.dep_getkey(x)
+       try:
+               testkey = portage.dep_getkey(x)
+       except portage_exception.InvalidData:
+               return False
        if testkey.startswith("null/"):
                testatom = x.replace(testkey[5:], "cat/"+testkey[5:])
        elif "/" not in x: