Skip to content

Commit e986737

Browse files
committed
htmlgen: Update directory to fabric
Signed-off-by: Daniel Schultz <[email protected]>
1 parent 6856651 commit e986737

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

htmlgen/htmlgen.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import os, sys, json, re
1616
from io import StringIO
17+
from prjxray.util import get_fabric_for_part
1718

1819

1920
def mk_get_setting(settings_filename):
@@ -234,9 +235,9 @@ def __init__(self):
234235
pass
235236

236237

237-
def load_tilegrid(db_dir, part, verbose=False, allow_fake=False):
238+
def load_tilegrid(db_dir, fabric, verbose=False, allow_fake=False):
238239
print("Loading tilegrid.")
239-
with db_open(os.path.join(part, "tilegrid.json"), db_dir) as f:
240+
with db_open(os.path.join(fabric, "tilegrid.json"), db_dir) as f:
240241
data = f.read()
241242
if not data:
242243
assert allow_fake, 'No tilegrid.json found'
@@ -983,11 +984,9 @@ def run(settings, output, verbose=False, allow_fake=False):
983984

984985
# Load source data
985986
dbstate = DBState()
987+
fabric = get_fabric_for_part(db_dir, get_setting("XRAY_PART"))
986988
grid = load_tilegrid(
987-
db_dir,
988-
get_setting("XRAY_PART"),
989-
verbose=verbose,
990-
allow_fake=allow_fake)
989+
db_dir, fabric, verbose=verbose, allow_fake=allow_fake)
991990
db_reads(dbstate, db_dir)
992991

993992
# Create pages

0 commit comments

Comments
 (0)