fix a bug for save
This commit is contained in:
parent
237f41c8b5
commit
b04ed80376
@ -262,8 +262,9 @@ if __name__ == '__main__':
|
|||||||
config.update(parsed)
|
config.update(parsed)
|
||||||
args.__dict__.update(config)
|
args.__dict__.update(config)
|
||||||
if args.save:
|
if args.save:
|
||||||
|
config.pop('save')
|
||||||
with open(conf_path, 'w+', encoding='utf-8') as f:
|
with open(conf_path, 'w+', encoding='utf-8') as f:
|
||||||
json.dump(args.__dict__, f, indent=4, ensure_ascii=False)
|
json.dump(config, f, indent=4, ensure_ascii=False)
|
||||||
|
|
||||||
addr = '{0}:{1}'.format(args.interface, args.port)
|
addr = '{0}:{1}'.format(args.interface, args.port)
|
||||||
print('Start HTTP server on {0} and use web root as {1}'.format(addr, args.root))
|
print('Start HTTP server on {0} and use web root as {1}'.format(addr, args.root))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user