comparison hgext/remotefilelog/basepack.py @ 49306:2e726c934fcd

py3: catch FileNotFoundError instead of checking errno == ENOENT
author Manuel Jacob <me@manueljacob.de>
date Tue, 31 May 2022 22:50:01 +0200
parents 1bf3eb65e970
children 18c8c18993f0
comparison
equal deleted inserted replaced
49305:53e9422a9b45 49306:2e726c934fcd
164 max(mtimes[id]), 164 max(mtimes[id]),
165 sizes[id], 165 sizes[id],
166 ) 166 )
167 else: 167 else:
168 ids.add(id) 168 ids.add(id)
169 except OSError as ex: 169 except FileNotFoundError:
170 if ex.errno != errno.ENOENT: 170 pass
171 raise
172 171
173 def _getavailablepackfilessorted(self): 172 def _getavailablepackfilessorted(self):
174 """Like `_getavailablepackfiles`, but also sorts the files by mtime, 173 """Like `_getavailablepackfiles`, but also sorts the files by mtime,
175 yielding newest files first. 174 yielding newest files first.
176 175