Mercurial > public > mercurial-scm > hg-stable
diff hgext/journal.py @ 49314: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 | 642e31cb55f0 |
children | d5116e4dc744 |
line wrap: on
line diff
--- a/hgext/journal.py Tue May 31 21:16:17 2022 +0200 +++ b/hgext/journal.py Tue May 31 22:50:01 2022 +0200 @@ -13,7 +13,6 @@ import collections -import errno import os import weakref @@ -140,9 +139,7 @@ """A set of shared features for this repository""" try: return set(repo.vfs.read(b'shared').splitlines()) - except IOError as inst: - if inst.errno != errno.ENOENT: - raise + except FileNotFoundError: return set()