Fixed message

This commit is contained in:
Dimitris Zlatanidis 2023-01-10 22:30:14 +02:00
parent 8ce1289e38
commit eba825bb01

View file

@ -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. """