mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Prevent crash when running MultiServer.py if host.yaml is not present (#46)
This commit is contained in:
@@ -6,6 +6,7 @@ import logging
|
|||||||
import zlib
|
import zlib
|
||||||
import collections
|
import collections
|
||||||
import typing
|
import typing
|
||||||
|
import os
|
||||||
|
|
||||||
import ModuleUpdate
|
import ModuleUpdate
|
||||||
ModuleUpdate.update()
|
ModuleUpdate.update()
|
||||||
@@ -613,6 +614,8 @@ async def main():
|
|||||||
parser.add_argument('--disable_item_cheat', default=False, action='store_true')
|
parser.add_argument('--disable_item_cheat', default=False, action='store_true')
|
||||||
parser.add_argument('--disable_port_forward', default=False, action='store_true')
|
parser.add_argument('--disable_port_forward', default=False, action='store_true')
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
|
|
||||||
|
if os.path.exists('host.yaml'):
|
||||||
file_options = Utils.parse_yaml(open("host.yaml").read())["server_options"]
|
file_options = Utils.parse_yaml(open("host.yaml").read())["server_options"]
|
||||||
for key, value in file_options.items():
|
for key, value in file_options.items():
|
||||||
if value is not None:
|
if value is not None:
|
||||||
|
Reference in New Issue
Block a user