Commit 85ec8a70 authored by okhin's avatar okhin 🚴

Fixing the arg_parse routine

parent 30295f08
Pipeline #779 passed with stage
in 2 seconds
...@@ -25,10 +25,10 @@ arg_parser = argparse.ArgumentParser(description='Manage the SIP Backend for the ...@@ -25,10 +25,10 @@ arg_parser = argparse.ArgumentParser(description='Manage the SIP Backend for the
config = configparser.ConfigParser() config = configparser.ConfigParser()
arg_parser.add_argument('-c', '--config', help="Config file") arg_parser.add_argument('-c', '--config', help="Config file")
arg_parser.parse_args() args = arg_parser.parse_args()
try: try:
logging.debug("Let's use {} as a config file".config(arg_parser.config,)) logging.debug("Let's use {} as a config file".config(arg_parser.config,))
config.read(arg_parser.config) config.read(args.config)
except AttributeError: except AttributeError:
try: try:
if os.path.isfile('config.ini'): if os.path.isfile('config.ini'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment