mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
WebHostLib.options: move to makedirs instead of mkdir.
This commit is contained in:
@@ -32,8 +32,7 @@ def create():
|
|||||||
dictify_range=dictify_range, default_converter=default_converter,
|
dictify_range=dictify_range, default_converter=default_converter,
|
||||||
)
|
)
|
||||||
|
|
||||||
if not os.path.isdir(os.path.join(target_folder, 'configs')):
|
os.makedirs(os.path.join(target_folder, 'configs'), exist_ok=True)
|
||||||
os.mkdir(os.path.join(target_folder, 'configs'))
|
|
||||||
|
|
||||||
with open(os.path.join(target_folder, 'configs', game_name + ".yaml"), "w") as f:
|
with open(os.path.join(target_folder, 'configs', game_name + ".yaml"), "w") as f:
|
||||||
f.write(res)
|
f.write(res)
|
||||||
@@ -81,8 +80,7 @@ def create():
|
|||||||
|
|
||||||
player_settings["gameOptions"] = game_options
|
player_settings["gameOptions"] = game_options
|
||||||
|
|
||||||
if not os.path.isdir(os.path.join(target_folder, 'player-settings')):
|
os.makedirs(os.path.join(target_folder, 'player-settings'), exist_ok=True)
|
||||||
os.mkdir(os.path.join(target_folder, 'player-settings'))
|
|
||||||
|
|
||||||
with open(os.path.join(target_folder, 'player-settings', game_name + ".json"), "w") as f:
|
with open(os.path.join(target_folder, 'player-settings', game_name + ".json"), "w") as f:
|
||||||
f.write(json.dumps(player_settings, indent=2, separators=(',', ': ')))
|
f.write(json.dumps(player_settings, indent=2, separators=(',', ': ')))
|
||||||
|
Reference in New Issue
Block a user