state: there's no _unpack in struct stable
authorAnton Shestakov <av6@dwimlabs.net>
Mon, 09 Dec 2019 16:01:56 +0700
branchstable
changeset 4989 25532ce787d9
parent 4988 588b3484c131
child 4990 f3fd3c1c3da0
state: there's no _unpack in struct Caught by pytype.
hgext3rd/evolve/state.py
--- a/hgext3rd/evolve/state.py	Sun Sep 29 11:47:18 2019 +0530
+++ b/hgext3rd/evolve/state.py	Mon Dec 09 16:01:56 2019 +0700
@@ -114,7 +114,7 @@
             repo.ui.debug(b'ignoring corrupted evolvestate (file contains %i bits)'
                           % len(versionblob))
             return None
-        version = struct._unpack(b'>I', versionblob)[0]
+        version = struct.unpack(b'>I', versionblob)[0]
         if version != 0:
             msg = _(b'unknown evolvestate version %i') % version
             raise error.Abort(msg, hint=_(b'upgrade your evolve'))
@@ -125,7 +125,7 @@
         while off < end:
             rtype = data[off]
             off += 1
-            length = struct._unpack(b'>I', data[off:(off + 4)])[0]
+            length = struct.unpack(b'>I', data[off:(off + 4)])[0]
             off += 4
             record = data[off:(off + length)]
             off += length