This commit is contained in:
Kovid Goyal 2011-04-15 19:55:09 -06:00
parent 9730d40de4
commit 4c4627fc38

View File

@ -141,7 +141,7 @@ class EXTHRecord(object):
204 : 'Creator Software', 204 : 'Creator Software',
205 : 'Creator Major Version', # '>I' 205 : 'Creator Major Version', # '>I'
206 : 'Creator Minor Version', # '>I' 206 : 'Creator Minor Version', # '>I'
207 : 'Creator Build number', # '>I' 207 : 'Creator Build Number', # '>I'
208 : 'watermark', 208 : 'watermark',
209 : 'tamper_proof_keys', 209 : 'tamper_proof_keys',
300 : 'fontsignature', 300 : 'fontsignature',
@ -153,6 +153,11 @@ class EXTHRecord(object):
503 : 'updatedtitle', 503 : 'updatedtitle',
}.get(self.type, repr(self.type)) }.get(self.type, repr(self.type))
if self.name in ('coveroffset', 'thumboffset', 'hasfakecover',
'Creator Major Version', 'Creator Minor Version',
'Creator Build Number', 'Creator Software'):
self.data, = struct.unpack(b'>I', self.data)
def __str__(self): def __str__(self):
return '%s (%d): %r'%(self.name, self.type, self.data) return '%s (%d): %r'%(self.name, self.type, self.data)