mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-31 10:26:39 +01:00
Fix user interrupt
This commit is contained in:
parent
279dd6abad
commit
8ac2a7ba41
1 changed files with 12 additions and 8 deletions
|
@ -32,6 +32,7 @@ def find_package(find_pkg, directory):
|
||||||
Find packages
|
Find packages
|
||||||
"""
|
"""
|
||||||
pkgs = []
|
pkgs = []
|
||||||
|
try:
|
||||||
if os.path.isdir(directory):
|
if os.path.isdir(directory):
|
||||||
installed = sorted(os.listdir(directory))
|
installed = sorted(os.listdir(directory))
|
||||||
blacklist = BlackList().packages(pkgs=installed, repo="local")
|
blacklist = BlackList().packages(pkgs=installed, repo="local")
|
||||||
|
@ -40,4 +41,7 @@ def find_package(find_pkg, directory):
|
||||||
if (not pkg.startswith(".") and pkg.startswith(find_pkg) and
|
if (not pkg.startswith(".") and pkg.startswith(find_pkg) and
|
||||||
split_package(pkg)[0] not in blacklist):
|
split_package(pkg)[0] not in blacklist):
|
||||||
pkgs.append(pkg)
|
pkgs.append(pkg)
|
||||||
|
except KeyboardInterrupt:
|
||||||
|
print("")
|
||||||
|
raise SystemExit()
|
||||||
return pkgs
|
return pkgs
|
||||||
|
|
Loading…
Reference in a new issue