From: Zac Medico Date: Tue, 5 Mar 2013 01:07:39 +0000 (-0800) Subject: Don't use splitext for .ebuild/.tbz2 check. X-Git-Tag: v2.2.0_alpha166~2 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=70ea9fada67dde2c8d8e61857153d940cb596683;p=portage.git Don't use splitext for .ebuild/.tbz2 check. --- 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"))