From 74eeefd8f8c757a68014219ebd0a1eb90f360b0c Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 19 Aug 2018 18:17:34 +0100 Subject: handle invalid package name, or nothing to upgrade cases --- src/backend/libsisyphus.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/backend/libsisyphus.py') diff --git a/src/backend/libsisyphus.py b/src/backend/libsisyphus.py index 30baffc..22292ca 100644 --- a/src/backend/libsisyphus.py +++ b/src/backend/libsisyphus.py @@ -241,6 +241,8 @@ def solvePkgDeps(pkgList): if "/" in portageOutput.rstrip(): pkgDep = str(portageOutput.rstrip().split("]")[1].strip("\ ")) pkgDeps.append(pkgDep) + else: + sys.exit("\n" + "Unable to find package(s); quitting." + "\n") return pkgDeps # call portage to solve world dependencies (CLI frontend) @@ -256,6 +258,8 @@ def solveWorldDeps(): worldDep = str(portageOutput.rstrip().split("]")[ 1].split("[")[0].strip("\ ")) worldDeps.append(worldDep) + else: + sys.exit("\n" + "Nothing to upgrade; quitting." + "\n") return worldDeps # fetch binaries and call portage to install the package(s) from local cache (CLI frontend) -- cgit v1.2.3