From 70ea9fada67dde2c8d8e61857153d940cb596683 Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Mon, 4 Mar 2013 17:07:39 -0800 Subject: [PATCH] Don't use splitext for .ebuild/.tbz2 check. --- pym/_emerge/actions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py index b8cb2cd0a..e4f93c63a 100644 --- a/pym/_emerge/actions.py +++ b/pym/_emerge/actions.py @@ -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")) -- 2.26.2