summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pym/_emerge/main.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/pym/_emerge/main.py b/pym/_emerge/main.py
index 83b50df63..6ac1b50eb 100644
--- a/pym/_emerge/main.py
+++ b/pym/_emerge/main.py
@@ -769,7 +769,8 @@ def parse_opts(tmpcmdline, silent=False):
if myaction is None and myoptions.deselect is True:
myaction = 'deselect'
- if sys.hexversion < 0x3000000 and not isinstance(myargs[0], unicode):
+ if myargs and sys.hexversion < 0x3000000 and \
+ not isinstance(myargs[0], unicode):
for i in range(len(myargs)):
myargs[i] = portage._unicode_decode(myargs[i])