lceda_step: fall back to using footprint 3D model UUID directly when component lookup fails
This commit is contained in:
+3
-3
@@ -130,14 +130,14 @@ def main():
|
|||||||
print(" {}: {}".format(code, e))
|
print(" {}: {}".format(code, e))
|
||||||
|
|
||||||
for uuid in uuids:
|
for uuid in uuids:
|
||||||
|
name, model, owner = uuid, uuid, ""
|
||||||
try:
|
try:
|
||||||
comp = get_component(uuid, args.cookie)
|
comp = get_component(uuid, args.cookie)
|
||||||
except Exception as e:
|
|
||||||
print("{}: {}".format(uuid, e))
|
|
||||||
continue
|
|
||||||
name = comp.get("display_title") or comp.get("title") or uuid
|
name = comp.get("display_title") or comp.get("title") or uuid
|
||||||
model = comp.get("3d_model_uuid")
|
model = comp.get("3d_model_uuid")
|
||||||
owner = comp.get("path", "")
|
owner = comp.get("path", "")
|
||||||
|
except Exception as e:
|
||||||
|
print("{}: component lookup failed ({}), trying uuid as model uuid".format(uuid, e))
|
||||||
print("{} | {} | model={} | owner={}".format(uuid, name, model, owner))
|
print("{} | {} | model={} | owner={}".format(uuid, name, model, owner))
|
||||||
if not model:
|
if not model:
|
||||||
print(" no 3D model available")
|
print(" no 3D model available")
|
||||||
|
|||||||
Reference in New Issue
Block a user