From cb5e1b7e2be724a34bbdb6aae7ade18a0c7a39bd Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 10 Jan 2023 22:24:32 +0200 Subject: [PATCH] Remove args check --- slpkg/main.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/slpkg/main.py b/slpkg/main.py index 44c61400..a9ae3a8d 100644 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -143,14 +143,8 @@ class Argparse: flags = commands[command] for opt in self.flags: - if opt.startswith('--'): - if opt not in flags and opt not in ['--help', '--version']: - self.usage.error_for_options(flags) - - for arg in self.args: - if arg.startswith('--'): - if arg not in self.options and arg not in ['--help', '--version']: - self.usage.error_for_options(flags) + if opt not in flags and opt not in ['--help', '--version']: + self.usage.error_for_options(flags) def choose_packages(self, packages, method): """ Choose packages with dialog utility and --search flag. """