From 6fd70b833a0eaf7d4c62136407e193e2003435c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Otto?= Date: Thu, 28 Sep 2023 11:16:35 +0200 Subject: [PATCH] Simplify condition --- basyx/aas/adapter/xml/xml_deserialization.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/basyx/aas/adapter/xml/xml_deserialization.py b/basyx/aas/adapter/xml/xml_deserialization.py index 551bde750..5d4030698 100644 --- a/basyx/aas/adapter/xml/xml_deserialization.py +++ b/basyx/aas/adapter/xml/xml_deserialization.py @@ -85,9 +85,8 @@ def _tag_replace_namespace(tag: str, nsmap: Dict[str, str]) -> str: """ split = tag.split("}") for prefix, namespace in nsmap.items(): - if prefix: - if namespace == split[0][1:]: - return prefix + ":" + split[1] + if prefix and namespace == split[0][1:]: + return prefix + ":" + split[1] return tag