aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorPedro de Medeiros <pedro.medeiros@gmail.com>2022-12-22 20:16:00 -0300
committerPedro de Medeiros <pedro.medeiros@gmail.com>2022-12-23 12:02:14 -0300
commit228007129f9fda791b7c7cf56ebb34a2487e6275 (patch)
tree0e7e89d44fb100152e1da5041eca5329077f49d1 /tools
parent4cd89b82ffbf3c1b83fb2a2221fc33f04f98118a (diff)
downloadubox-msx-lib-228007129f9fda791b7c7cf56ebb34a2487e6275.tar.gz
ubox-msx-lib-228007129f9fda791b7c7cf56ebb34a2487e6275.zip
map.py may ignore missing map_conf.json
Diffstat (limited to 'tools')
-rwxr-xr-xtools/map.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/tools/map.py b/tools/map.py
index 0ce19fb..9fce018 100755
--- a/tools/map.py
+++ b/tools/map.py
@@ -145,9 +145,6 @@ def main():
args = parser.parse_args()
- with open(args.conf, "rt") as fd:
- conf = json.load(fd)
-
with open(args.map_json, "rt") as fd:
data = json.load(fd)
@@ -226,6 +223,8 @@ def main():
file=sys.stderr,
)
if len(entities_layer) and entities_layer["visible"]:
+ with open(args.conf, "rt") as fd:
+ conf = json.load(fd)
et_names = [d["name"] for d in conf["entities"]]
et_weigths = dict((d["name"], d["w"]) for d in conf["entities"])
et_bytes = dict((d["name"], d["bytes"]) for d in conf["entities"])