From 7951e7cb1e898aa9c3633cfec8e4d6ff64cb6b81 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Mon, 31 Aug 2015 04:53:32 +0300 Subject: [PATCH] Fix remove None type packages --- slpkg/pkg/manager.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index f6dbfc19..263eb7ff 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -184,9 +184,10 @@ class PackageManager(object): self.meta.__all__, self.meta.__version__), status=True).checklist() - for rmv in pkgs: - removed.append(split_package(rmv)[0]) - self.meta.default_answer = "y" + if pkgs: + for rmv in pkgs: + removed.append(split_package(rmv)[0]) + self.meta.default_answer = "y" else: for rmv, pkg in zip(removed, packages): print("[ {0}delete{1} ] --> {2}".format(