mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-03-21 17:24:42 -05:00
wram: return an empty dict for missing constants files
This commit is contained in:
parent
d983b8a02a
commit
020ae38d34
|
|
@ -117,10 +117,10 @@ def read_constants(filepath):
|
|||
"""
|
||||
Load lines from a file and call scrape_constants.
|
||||
"""
|
||||
lines = None
|
||||
|
||||
with open(filepath, "r") as file_handler:
|
||||
lines = file_handler.readlines()
|
||||
lines = []
|
||||
if os.path.exists(filepath):
|
||||
with open(filepath, "r") as file_handler:
|
||||
lines = file_handler.readlines()
|
||||
|
||||
constants = scrape_constants(lines)
|
||||
return constants
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user