summaryrefslogtreecommitdiffstats
path: root/rtemsspec
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-09 08:26:14 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2021-02-09 09:41:00 +0100
commiteb6dd90665bc4818ceb36c10f82fb4073094e6b2 (patch)
tree31de46c951aa5c30ff75929c0095cf51692779b5 /rtemsspec
parentspec: Fix references (diff)
downloadrtems-central-eb6dd90665bc4818ceb36c10f82fb4073094e6b2.tar.bz2
items: Fix item used for the UID mapping
Diffstat (limited to 'rtemsspec')
-rw-r--r--rtemsspec/items.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/rtemsspec/items.py b/rtemsspec/items.py
index 666f6311..bfd0dac1 100644
--- a/rtemsspec/items.py
+++ b/rtemsspec/items.py
@@ -501,17 +501,17 @@ class ItemMapper:
uid, key_path = uid_key_path[:colon], uid_key_path[colon + 1:]
else:
uid, key_path = uid_key_path, "/_uid"
+ if item is None:
+ item = self._item
if uid == ".":
if prefix is None:
prefix = "/".join(self._prefix)
- if item is None:
- item = self._item
else:
prefix = ""
try:
- item = self._item.map(uid)
+ item = item.map(uid)
except KeyError as err:
- msg = (f"item '{uid}' relative to {self._item.spec} "
+ msg = (f"item '{uid}' relative to {item.spec} "
f"specified by '{identifier}' does not exist")
raise ValueError(msg) from err
key_path = normalize_key_path(key_path, prefix)