MCPcopy Create free account
hub / github.com/comaps/comaps / _read_version

Method _read_version

tools/python/mwm/mwm_python.py:131–141  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

129 return pos, end
130
131 def _read_version(self) -> mi.MwmVersion:
132 self.seek_tag("version")
133 # Skip prolog.
134 self.file.read(4)
135 fmt = read_varuint(self.file) + 1
136 seconds_since_epoch = read_varuint(self.file)
137 vdate = datetime.fromtimestamp(seconds_since_epoch)
138 version = int(vdate.strftime("%y%m%d"))
139 return mi.MwmVersion(
140 format=fmt, seconds_since_epoch=seconds_since_epoch, version=version
141 )
142
143
144class MwmPythonIter:

Callers 1

__init__Method · 0.95

Calls 3

seek_tagMethod · 0.95
read_varuintFunction · 0.85
readMethod · 0.45

Tested by

no test coverage detected