From 7d39184bdf96279e94093306ab3102974069f5a2 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 18 Jan 2016 19:51:34 +0200 Subject: [PATCH] Fix IndexError: list index out of range --- slpkg/main.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slpkg/main.py b/slpkg/main.py index 40126584..c473cbc7 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -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("")