diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2018-08-19 18:17:34 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2018-08-19 18:17:34 +0100 |
commit | 74eeefd8f8c757a68014219ebd0a1eb90f360b0c (patch) | |
tree | b9bc55359789ceb05c62f19ec15e31ecacb3f55c /src/backend/libsisyphus.py | |
parent | bc9c39c776b27874dc1e9d4322a5326cb859975c (diff) |
handle invalid package name, or nothing to upgrade cases
Diffstat (limited to 'src/backend/libsisyphus.py')
-rw-r--r-- | src/backend/libsisyphus.py | 4 |
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) |