Use endswith(tuple).
diff --git a/pym/_emerge/actions.py b/pym/_emerge/actions.py
index e4f93c6..fae293e 100644
--- a/pym/_emerge/actions.py
+++ b/pym/_emerge/actions.py
@@ -3597,7 +3597,7 @@
 	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"))