eric7/E5XML/XMLStreamReaderBase.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8327
666c2b81cbb7
--- a/eric7/E5XML/XMLStreamReaderBase.py	Sun May 16 20:07:24 2021 +0200
+++ b/eric7/E5XML/XMLStreamReaderBase.py	Mon May 17 19:58:15 2021 +0200
@@ -111,10 +111,21 @@
         @param default default value (string)
         @return value of the requested tag attribute (string)
         """
-        att = self.attributes().value(name)
-        if att == "":
-            att = default
-        return att
+        attributes = self.attributes()
+        for attribute in attributes:
+            if attribute.name() == name:
+                value = attribute.value()
+                if not value:
+                    value = default
+                break
+        else:
+            value = default
+        return value
+        # TODO: re-enable this code once PyQt6 is fixed and released
+##        att = self.attributes().value(name)
+##        if att == "":
+##            att = default
+##        return att
     
     def _skipUnknownElement(self):
         """

eric ide

mercurial