header.py

changeset 69
a24c4490d9f2
parent 67
afaa4d3bc3e5
child 76
c73432653fd9
equal deleted inserted replaced
68:c19dd0d3248e 69:a24c4490d9f2
19 self.history = [] 19 self.history = []
20 self.first_occurrence = dict() 20 self.first_occurrence = dict()
21 @property 21 @property
22 def valid(self): 22 def valid(self):
23 return True 23 return True
24 @property
25 def effective_filetype(self):
26 if self.filetype.startswith('Unofficial_'):
27 return self.filetype.rsplit('Unofficial_')[1]
28 else:
29 return self.filetype
24 30
25 class BadHeader: 31 class BadHeader:
26 def __init__(self, index, reason): 32 def __init__(self, index, reason):
27 self.index = index 33 self.index = index
28 self.reason = reason 34 self.reason = reason

mercurial