mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-11-16 07:47:35 +01:00
Updated for errors
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
ceddfdb536
commit
3bce3c2afc
1 changed files with 9 additions and 3 deletions
|
@ -18,6 +18,7 @@ from slpkg.utilities import Utilities
|
||||||
from slpkg.cleanings import Cleanings
|
from slpkg.cleanings import Cleanings
|
||||||
from slpkg.search import SearchPackage
|
from slpkg.search import SearchPackage
|
||||||
from slpkg.views.cli_menu import Usage
|
from slpkg.views.cli_menu import Usage
|
||||||
|
from slpkg.error_messages import Errors
|
||||||
from slpkg.views.version import Version
|
from slpkg.views.version import Version
|
||||||
from slpkg.choose_packages import Choose
|
from slpkg.choose_packages import Choose
|
||||||
from slpkg.repositories import Repositories
|
from slpkg.repositories import Repositories
|
||||||
|
@ -475,12 +476,14 @@ class Menu(Configs): # pylint: disable=[R0902]
|
||||||
|
|
||||||
if added:
|
if added:
|
||||||
packages = [pkg for pkg in packages if not pkg.endswith('_Added.')]
|
packages = [pkg for pkg in packages if not pkg.endswith('_Added.')]
|
||||||
added = self.choose.packages(self.data, added, command)
|
# added = self.choose.packages(self.data, added, command)
|
||||||
|
# Add the new added packages front to list for install.
|
||||||
|
packages: list = added.extend(packages)
|
||||||
|
|
||||||
packages: list = self.choose.packages(self.data, packages, command)
|
packages: list = self.choose.packages(self.data, packages, command)
|
||||||
|
|
||||||
# Add the new added packages front to list for install.
|
# Add the new added packages front to list for install.
|
||||||
packages: list = added.extend(packages)
|
# packages: list = added.extend(packages)
|
||||||
|
|
||||||
if not packages:
|
if not packages:
|
||||||
print('\nEverything is up-to-date!\n')
|
print('\nEverything is up-to-date!\n')
|
||||||
|
@ -849,8 +852,11 @@ def main() -> None:
|
||||||
|
|
||||||
try:
|
try:
|
||||||
arguments[args[0]]()
|
arguments[args[0]]()
|
||||||
except (KeyError, IndexError):
|
except KeyError:
|
||||||
logging.error("Exception occurred", exc_info=True)
|
logging.error("Exception occurred", exc_info=True)
|
||||||
|
error = Errors()
|
||||||
|
error.raise_error_message(message='Something went wrong, look in the log file.', exit_status=1)
|
||||||
|
except IndexError:
|
||||||
usage.help_short(1)
|
usage.help_short(1)
|
||||||
except KeyboardInterrupt as e:
|
except KeyboardInterrupt as e:
|
||||||
raise SystemExit(1) from e
|
raise SystemExit(1) from e
|
||||||
|
|
Loading…
Reference in a new issue