changeset 4989:25532ce787d9 stable

state: there's no _unpack in struct Caught by pytype.
author Anton Shestakov <av6@dwimlabs.net>
date Mon, 09 Dec 2019 16:01:56 +0700
parents 588b3484c131
children f3fd3c1c3da0
files hgext3rd/evolve/state.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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