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,9 +557,10 @@ class ArgParse(object):
extra.append(additional)
self.args.remove(additional)
packages = self.args[1:]
if self.args[1] in flags:
flag = self.args[1]
packages = self.args[2:]
for fl in flags:
if fl in self.args:
flag = self.args[1]
packages = self.args[2:]
PackageManager(packages).remove(flag, extra)
else:
usage("")