mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-08-15 02:39:13 +02:00
Don't use YAML as a singleton, seems to be stateful; Use ruamel in get_config for consistency
This commit is contained in:
@ -17,10 +17,11 @@ args = parser.parse_args()
|
||||
|
||||
|
||||
if os.path.isfile(config_yaml):
|
||||
import yaml
|
||||
from ruamel.yaml import YAML
|
||||
yaml = YAML(typ='safe')
|
||||
with open(config_yaml, 'r') as configfile:
|
||||
try:
|
||||
config = yaml.safe_load(configfile)
|
||||
config = yaml.load(configfile)
|
||||
except Exception as e:
|
||||
print(e, file=sys.stderr)
|
||||
config = {}
|
||||
|
Reference in New Issue
Block a user