Skip to content

Commit e6156ee

Browse files
committed
another attempt
1 parent b94f8ff commit e6156ee

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

Patch.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ def create_rom_file(patch_file: str) -> Tuple[RomMeta, str]:
2424
if auto_handler:
2525
handler: APAutoPatchInterface = auto_handler(patch_file)
2626
handler.read()
27-
if handler.game:
28-
game_version = AutoWorldRegister.world_types[handler.game].world_version
29-
if game_version is not None and handler.world_version and game_version != handler.world_version:
27+
game_version = AutoWorldRegister.world_types[handler.game].world_version if handler.game else None
28+
if game_version and handler.world_version and game_version != handler.world_version:
3029
info_msg = "This patch was generated with " \
3130
f"{handler.game} version {handler.world_version.as_simple_string()}, " \
3231
f"but its currently installed version is {game_version.as_simple_string()}. " \

0 commit comments

Comments
 (0)