Use endswith(tuple).
authorZac Medico <zmedico@gentoo.org>
Tue, 5 Mar 2013 01:21:03 +0000 (17:21 -0800)
committerZac Medico <zmedico@gentoo.org>
Tue, 5 Mar 2013 01:21:03 +0000 (17:21 -0800)
pym/_emerge/actions.py

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