Skip to content

Commit

Permalink
fix error checking for given path from the args
Browse files Browse the repository at this point in the history
  • Loading branch information
zaytiri committed Mar 26, 2023
1 parent 8e51eeb commit a5859b5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions progscheduler/settings/specific_arguments.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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

Expand Down

0 comments on commit a5859b5

Please sign in to comment.