mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
Fixed message
This commit is contained in:
parent
8ce1289e38
commit
eba825bb01
1 changed files with 4 additions and 5 deletions
|
@ -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. """
|
||||
|
|
Loading…
Reference in a new issue