diff --git a/generator/pygen/pygen.cpp b/generator/pygen/pygen.cpp index ac7fa2d10e..0c8715e876 100644 --- a/generator/pygen/pygen.cpp +++ b/generator/pygen/pygen.cpp @@ -348,6 +348,7 @@ BOOST_PYTHON_MODULE(pygen) .value("v7", version::Format::v7) .value("v8", version::Format::v8) .value("v9", version::Format::v9) + .value("v10", version::Format::v10) .value("last", version::Format::lastFormat); bp::class_("SectionInfo", bp::no_init) diff --git a/tools/python/mwm/mwm_python.py b/tools/python/mwm/mwm_python.py index c8b1d57c8c..d81a68685d 100644 --- a/tools/python/mwm/mwm_python.py +++ b/tools/python/mwm/mwm_python.py @@ -34,7 +34,8 @@ class MwmPython(mi.Mwm): self.map_type = mi.MapType(read_varint(self.file)) self.version_ = self._read_version() - self.metadata_offsets = self._read_metadata_offsets() + if self.version_.format < 10 : + self.metadata_offsets = self._read_metadata_offsets() def version(self) -> mi.MwmVersion: return self.version_ @@ -88,6 +89,7 @@ class MwmPython(mi.Mwm): return tags def _read_metadata_offsets(self) -> Dict[int, int]: + assert self.version_.format < 10 self.seek_tag("metaidx") tag_info = self.get_tag("metaidx") current = 0