Removed apparently unreachable XML code for 2.6.
This commit is contained in:
parent
756ade30fa
commit
a79e234f8a
1 changed files with 1 additions and 6 deletions
|
|
@ -2740,12 +2740,7 @@ class XMLBox(Jp2kBox):
|
||||||
def write(self, fptr):
|
def write(self, fptr):
|
||||||
"""Write an XML box to file.
|
"""Write an XML box to file.
|
||||||
"""
|
"""
|
||||||
try:
|
read_buffer = ET.tostring(self.xml, encoding='utf-8')
|
||||||
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')
|
|
||||||
|
|
||||||
fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
|
fptr.write(struct.pack('>I4s', len(read_buffer) + 8, b'xml '))
|
||||||
fptr.write(read_buffer)
|
fptr.write(read_buffer)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue