From a5859b5430b91c9c46bb58417e9285bd20a04295 Mon Sep 17 00:00:00 2001 From: zay <64491586+zaytiri@users.noreply.github.com> Date: Sun, 26 Mar 2023 11:42:34 +0100 Subject: [PATCH] fix error checking for given path from the args --- progscheduler/settings/specific_arguments.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/progscheduler/settings/specific_arguments.py b/progscheduler/settings/specific_arguments.py index ee14520..2d76e86 100644 --- a/progscheduler/settings/specific_arguments.py +++ b/progscheduler/settings/specific_arguments.py @@ -92,7 +92,7 @@ def add_arguments(self, args_parser): default=argparse.SUPPRESS) def process_arguments(self, settings): - self.__check_any_errors() + self.__check_any_errors(settings[0].user_arguments) self.__process_days(settings[0].user_arguments) def __process_days(self, user_arguments): @@ -104,10 +104,10 @@ def __process_days(self, user_arguments): elif user_arguments.days[0] == 'everyday': user_arguments.days = self.__get_specific_days('everyday') - def __check_any_errors(self): + def __check_any_errors(self, user_args): try: - if not self.__given_argument_path_exists(self.path): - throw(self.path + '\' path does not exist.') + if not self.__given_argument_path_exists(user_args.path): + throw(user_args.path + '\' path does not exist.') except (AttributeError, TypeError): pass