diff --git a/slpkg/main.py b/slpkg/main.py index c10f0809..180c8cdd 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -18,6 +18,7 @@ from slpkg.utilities import Utilities from slpkg.cleanings import Cleanings from slpkg.search import SearchPackage from slpkg.views.cli_menu import Usage +from slpkg.error_messages import Errors from slpkg.views.version import Version from slpkg.choose_packages import Choose from slpkg.repositories import Repositories @@ -475,12 +476,14 @@ class Menu(Configs): # pylint: disable=[R0902] if 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) # Add the new added packages front to list for install. - packages: list = added.extend(packages) + # packages: list = added.extend(packages) if not packages: print('\nEverything is up-to-date!\n') @@ -849,8 +852,11 @@ def main() -> None: try: arguments[args[0]]() - except (KeyError, IndexError): + except KeyError: 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) except KeyboardInterrupt as e: raise SystemExit(1) from e