diff --git a/main.py b/main.py index 852ed2a..94eed45 100644 --- a/main.py +++ b/main.py @@ -76,8 +76,10 @@ class KeeneticAPI: def interfaces(args): + config_file = os.path.normpath(os.path.join(parent_dir, args.config_file)) + config = ConfigParser.ConfigParser() - config.read(args.config_file) + config.read(config_file) api = KeeneticAPI() api.auth( config.get('auth', 'login'), @@ -97,8 +99,10 @@ def interfaces(args): print "{:^{width}} {:^{width}}".format(iface, (ifaces[iface].get('description') or '-'), width=max_len) def start(args): + config_file = os.path.normpath(os.path.join(parent_dir, args.config_file)) + config = ConfigParser.ConfigParser() - config.read(args.config_file) + config.read(config_file) api = KeeneticAPI() api.auth(