mirror of https://github.com/morpheus65535/bazarr
no log: replace config.ini.old if it exists instead of failing.
This commit is contained in:
parent
bc0b101fd7
commit
addae11b61
|
@ -346,7 +346,7 @@ def convert_ini_to_yaml(config_file):
|
||||||
output_dict[section].update({item[0]: item[1]})
|
output_dict[section].update({item[0]: item[1]})
|
||||||
with open(os.path.join(os.path.dirname(config_file), 'config.yaml'), 'w') as file:
|
with open(os.path.join(os.path.dirname(config_file), 'config.yaml'), 'w') as file:
|
||||||
yaml.dump(output_dict, file)
|
yaml.dump(output_dict, file)
|
||||||
os.rename(config_file, f'{config_file}.old')
|
os.replace(config_file, f'{config_file}.old')
|
||||||
|
|
||||||
|
|
||||||
config_yaml_file = os.path.join(args.config_dir, 'config', 'config.yaml')
|
config_yaml_file = os.path.join(args.config_dir, 'config', 'config.yaml')
|
||||||
|
|
Loading…
Reference in New Issue