blob: d7b694dc8225752a118352efbb3ece3a741a96e6 [file] [log] [blame]
Alex Savatieievc9055712019-03-01 14:43:56 -06001import os
2
3from cfg_checker.common.exception import ConfigException
4
5
6def get_file_arg(args):
7 if args.file:
8 return args.file
9 else:
10 raise ConfigException("No report filename supplied")
11
12
13def get_path_arg(path):
14 if os.path.exists(path):
15 return path
16 else:
17 raise ConfigException("'{}' not exists".format(path))