mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-09-26 19:40:56 -05:00
wram: return an empty dict for missing constants files
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user