header.py

changeset 69
a24c4490d9f2
parent 67
afaa4d3bc3e5
child 76
c73432653fd9
--- a/header.py	Sat Jun 22 23:38:51 2019 +0300
+++ b/header.py	Sat Jun 22 23:52:08 2019 +0300
@@ -21,6 +21,12 @@
     @property
     def valid(self):
         return True
+    @property
+    def effective_filetype(self):
+        if self.filetype.startswith('Unofficial_'):
+            return self.filetype.rsplit('Unofficial_')[1]
+        else:
+            return self.filetype
 
 class BadHeader:
     def __init__(self, index, reason):

mercurial