mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
Use yaml.safe_*
This commit is contained in:
parent
cb2c3a34bb
commit
b4f8ab289d
1 changed files with 2 additions and 2 deletions
|
@ -416,7 +416,7 @@ def main():
|
||||||
logging.info('Halting %s', serverdir)
|
logging.info('Halting %s', serverdir)
|
||||||
v.halt()
|
v.halt()
|
||||||
with open(vf, 'r', encoding='utf-8') as f:
|
with open(vf, 'r', encoding='utf-8') as f:
|
||||||
oldconfig = yaml.load(f)
|
oldconfig = yaml.safe_load(f)
|
||||||
if config != oldconfig:
|
if config != oldconfig:
|
||||||
logging.info("Server configuration has changed, rebuild from scratch is required")
|
logging.info("Server configuration has changed, rebuild from scratch is required")
|
||||||
vm.destroy()
|
vm.destroy()
|
||||||
|
@ -427,7 +427,7 @@ def main():
|
||||||
logging.info("No existing server - building from scratch")
|
logging.info("No existing server - building from scratch")
|
||||||
if writevf:
|
if writevf:
|
||||||
with open(vf, 'w', encoding='utf-8') as f:
|
with open(vf, 'w', encoding='utf-8') as f:
|
||||||
yaml.dump(config, f)
|
yaml.safe_dump(config, f)
|
||||||
|
|
||||||
# Check if selected provider is supported
|
# Check if selected provider is supported
|
||||||
if config['vm_provider'] not in ['libvirt', 'virtualbox']:
|
if config['vm_provider'] not in ['libvirt', 'virtualbox']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue