diff --git a/slpkg/main.py b/slpkg/main.py index a9ae3a8d..c2e28733 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -51,7 +51,7 @@ class Argparse: self.flag_full_reverse = '--full-reverse' self.flag_search = '--search' - self.dialog_is_enabled() + self.is_dialog_enabled() self.options = [self.flag_yes, self.flag_jobs, @@ -70,13 +70,12 @@ class Argparse: self.args.remove(opt) self.flags.append(opt) - def dialog_is_enabled(self): + def is_dialog_enabled(self): """ Checking if the dialog box is enabled. """ if (not self.configs.dialog and self.flag_search in self.args or not self.configs.dialog and 'configs' in self.args): - print("Error: You should enable the dialog " - "in the '/etc/slpkg/' folder.\n") - self.usage.help(1) + raise SystemExit("\nError: You should enable the dialog " + "in the '/etc/slpkg/' folder.\n") def check_for_flags(self, command): """ Check for correct flag. """