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):
|
def interfaces(args):
|
||||||
|
config_file = os.path.normpath(os.path.join(parent_dir, args.config_file))
|
||||||
|
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(args.config_file)
|
config.read(config_file)
|
||||||
api = KeeneticAPI()
|
api = KeeneticAPI()
|
||||||
api.auth(
|
api.auth(
|
||||||
config.get('auth', 'login'),
|
config.get('auth', 'login'),
|
||||||
@ -97,8 +99,10 @@ def interfaces(args):
|
|||||||
print "{:^{width}} {:^{width}}".format(iface, (ifaces[iface].get('description') or '-'), width=max_len)
|
print "{:^{width}} {:^{width}}".format(iface, (ifaces[iface].get('description') or '-'), width=max_len)
|
||||||
|
|
||||||
def start(args):
|
def start(args):
|
||||||
|
config_file = os.path.normpath(os.path.join(parent_dir, args.config_file))
|
||||||
|
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(args.config_file)
|
config.read(config_file)
|
||||||
|
|
||||||
api = KeeneticAPI()
|
api = KeeneticAPI()
|
||||||
api.auth(
|
api.auth(
|
||||||
|
Loading…
Reference in New Issue
Block a user