Don't use splitext for .ebuild/.tbz2 check.
authorZac Medico <zmedico@gentoo.org>
Tue, 5 Mar 2013 01:07:39 +0000 (17:07 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 5 Mar 2013 01:07:39 +0000 (17:07 -0800)
pym/_emerge/actions.py

index b8cb2cd0ab02cd315c89aefb7284c5f77a44a2b9..e4f93c63ab5fa7a58cdf3bea80efb3170b237ec2 100644 (file)
@@ -3597,8 +3597,7 @@ def run_action(settings, trees, mtimedb, myaction, myopts, myfiles,
        del mytrees, mydb
 
        for x in myfiles:
-               ext = os.path.splitext(x)[1]
-               if (ext == ".ebuild" or ext == ".tbz2") and \
+               if (x.endswith(".ebuild") or x.endswith(".tbz2")) and \
                        os.path.exists(os.path.abspath(x)):
                        print(colorize("BAD", "\n*** emerging by path is broken "
                                "and may not always work!!!\n"))