summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2018-08-19 18:17:34 +0100
committerV3n3RiX <venerix@redcorelinux.org>2018-08-19 18:17:34 +0100
commit74eeefd8f8c757a68014219ebd0a1eb90f360b0c (patch)
treeb9bc55359789ceb05c62f19ec15e31ecacb3f55c
parentbc9c39c776b27874dc1e9d4322a5326cb859975c (diff)
handle invalid package name, or nothing to upgrade cases
-rw-r--r--src/backend/libsisyphus.py4
1 files changed, 4 insertions, 0 deletions
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)