Fix IndexError: list index out of range

This commit is contained in:
Dimitris Zlatanidis 2016-01-18 19:51:34 +02:00
parent b4a7c5b5c8
commit 7d39184bdf

View file

@ -557,7 +557,8 @@ class ArgParse(object):
extra.append(additional) extra.append(additional)
self.args.remove(additional) self.args.remove(additional)
packages = self.args[1:] packages = self.args[1:]
if self.args[1] in flags: for fl in flags:
if fl in self.args:
flag = self.args[1] flag = self.args[1]
packages = self.args[2:] packages = self.args[2:]
PackageManager(packages).remove(flag, extra) PackageManager(packages).remove(flag, extra)