From 24802a0433b03335ebc971a98e685498d661b961 Mon Sep 17 00:00:00 2001
From: Piotr Maslanka <piotr.maslanka@henrietta.com.pl>
Date: Sun, 8 Oct 2017 10:26:45 +0200
Subject: [PATCH] .

---
 coolamqp/framing/compilation/xml_fields.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/coolamqp/framing/compilation/xml_fields.py b/coolamqp/framing/compilation/xml_fields.py
index 8e108b4..d6dfe9b 100644
--- a/coolamqp/framing/compilation/xml_fields.py
+++ b/coolamqp/framing/compilation/xml_fields.py
@@ -60,9 +60,7 @@ class _ValueField(_Field):
         xmln = [xmln for xmln in self.xml_names if xmln in elem.attrib]
 
         if xmln:
-            xmln = xmln[0]
-            if xmln in elem.attrib:
-                return elem.attrib[xmln]
+            return elem.attri[xmln[0]]
         else:
             if self.default is _Required:
                 raise TypeError('Did not find field %s in elem tag %s, looked for names %s' % (self.field_name, elem.tag, self.xml_names))
-- 
GitLab