Fix argument validation to allow file paths. Thanks to Arfrever for reporting.
authorZac Medico <zmedico@gentoo.org>
Mon, 23 Mar 2009 02:19:22 +0000 (02:19 -0000)
committerZac Medico <zmedico@gentoo.org>
Mon, 23 Mar 2009 02:19:22 +0000 (02:19 -0000)
(trunk r13140)

svn path=/main/branches/2.1.6/; revision=13157

pym/_emerge/__init__.py

index 6b26f594e5fcca6108f4fefbe05ee544bb1a03c0..67ec6de0e7bd8beb0c59999c36cff5ac4a2d6d1c 100644 (file)
@@ -15178,6 +15178,13 @@ def emerge_main():
                        if x.startswith(SETPREFIX) or \
                                is_valid_package_atom(x):
                                continue
+                       if x[:1] == os.sep:
+                               continue
+                       try:
+                               os.lstat(x)
+                               continue
+                       except OSError:
+                               pass
                        msg = []
                        msg.append("'%s' is not a valid package atom." % (x,))
                        msg.append("Please check ebuild(5) for full details.")