fix config resolve
This commit is contained in:
parent
a373c65a73
commit
fdf6609b9b
8
main.py
8
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(
|
||||
|
Loading…
Reference in New Issue
Block a user