fix a bug for save

This commit is contained in:
mingyang 2021-06-02 15:55:03 +08:00
parent 237f41c8b5
commit b04ed80376

View File

@ -262,8 +262,9 @@ if __name__ == '__main__':
config.update(parsed)
args.__dict__.update(config)
if args.save:
config.pop('save')
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)
print('Start HTTP server on {0} and use web root as {1}'.format(addr, args.root))