Removed apparently unreachable XML code for 2.6.

This commit is contained in:
John Evans 2014-05-10 15:54:28 -04:00
commit a79e234f8a

View file

@ -2740,12 +2740,7 @@ class XMLBox(Jp2kBox):
def write(self, fptr):
"""Write an XML box to file.
"""
try:
read_buffer = ET.tostring(self.xml, encoding='utf-8')
except (AttributeError, AssertionError):
# AssertionError on 2.6
read_buffer = ET.tostring(self.xml.getroot(), encoding='utf-8')
read_buffer = ET.tostring(self.xml, encoding='utf-8')
fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
fptr.write(read_buffer)