comparison mercurial/state.py @ 38127:b7e5c53a779e

state: temporary silence pyflakes warning by removing variable assignment The variable 'version' is going to be used in upcoming series where we will be using the version number to read a certain state file. However currently, pyflakes fails because of the variable not being used. Let's remove the assignment temporarily so that buildbots and test-suite is happy until I iterate over remaining part of the series. Differential Revision: https://phab.mercurial-scm.org/D3641
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 22 May 2018 00:25:18 +0530
parents bdc4079ceb16
children dce718404ce6
comparison
equal deleted inserted replaced
38126:bdc4079ceb16 38127:b7e5c53a779e
68 def _read(self): 68 def _read(self):
69 """reads the state file and returns a dictionary which contain 69 """reads the state file and returns a dictionary which contain
70 data in the same format as it was before storing""" 70 data in the same format as it was before storing"""
71 with self._repo.vfs(self.fname, 'rb') as fp: 71 with self._repo.vfs(self.fname, 'rb') as fp:
72 try: 72 try:
73 version = int(fp.readline()) 73 int(fp.readline())
74 except ValueError: 74 except ValueError:
75 raise error.ProgrammingError("unknown version of state file" 75 raise error.ProgrammingError("unknown version of state file"
76 " found") 76 " found")
77 return cbor.load(fp) 77 return cbor.load(fp)
78 78