diff options
-rw-r--r-- | daemons/lvmdbusd/objectmanager.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/daemons/lvmdbusd/objectmanager.py b/daemons/lvmdbusd/objectmanager.py index a9d13a75d..563b9ec0e 100644 --- a/daemons/lvmdbusd/objectmanager.py +++ b/daemons/lvmdbusd/objectmanager.py @@ -223,8 +223,9 @@ class ObjectManager(AutomatedProperties): :param lvm_id: The lvm identifier """ with self.rlock: - if lvm_id in self._id_to_object_path: - return self.get_object_by_path(self._id_to_object_path[lvm_id]) + lookup_rc = self._id_lookup(lvm_id) + if lookup_rc: + return self.get_object_by_path(lookup_rc) return None def get_object_path_by_lvm_id(self, lvm_id): @@ -234,8 +235,9 @@ class ObjectManager(AutomatedProperties): :return: Object path or '/' if not found """ with self.rlock: - if lvm_id in self._id_to_object_path: - return self._id_to_object_path[lvm_id] + lookup_rc = self._id_lookup(lvm_id) + if lookup_rc: + return lookup_rc return '/' def _uuid_verify(self, path, uuid, lvm_id): |