comparison mercurial/scmutil.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 d44e3c45f0e4
children b57c95a0f5f9
comparison
equal deleted inserted replaced
49305:53e9422a9b45 49306:2e726c934fcd
1617 1617
1618 @staticmethod 1618 @staticmethod
1619 def stat(path): 1619 def stat(path):
1620 try: 1620 try:
1621 return util.cachestat(path) 1621 return util.cachestat(path)
1622 except OSError as e: 1622 except FileNotFoundError:
1623 if e.errno != errno.ENOENT: 1623 pass
1624 raise
1625 1624
1626 1625
1627 class filecacheentry: 1626 class filecacheentry:
1628 def __init__(self, paths, stat=True): 1627 def __init__(self, paths, stat=True):
1629 self._entries = [] 1628 self._entries = []