File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -1163,13 +1163,16 @@ def change_instance_in_path(data):
11631163 for plugin in Path (os .path .join (self .config_dir , 'plugins' )).glob ('*.yaml' ):
11641164 data = yaml .load (plugin .read_text (encoding = 'utf-8' ))
11651165 change_instance_in_config (data )
1166- yaml .dump (data , plugin )
1166+ with plugin .open ('w' , encoding = 'utf-8' ) as outfile :
1167+ yaml .dump (data , outfile )
11671168
11681169 # rename service configs
11691170 for service in Path (os .path .join (self .config_dir , 'services' )).glob ('*.yaml' ):
11701171 data = yaml .load (service .read_text (encoding = 'utf-8' ))
11711172 change_instance_in_config (data )
1172- yaml .dump (data , service )
1173+ with service .open ('w' , encoding = 'utf-8' ) as outfile :
1174+ yaml .dump (data , outfile )
1175+
11731176
11741177 # restart all services but the bot
11751178 tasks = []
You can’t perform that action at this time.
0 commit comments