Mercurial > hg
diff hgext/rebase.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 | 642e31cb55f0 |
children | cfff73cab721 |
line wrap: on
line diff
--- a/hgext/rebase.py Tue May 31 21:16:17 2022 +0200 +++ b/hgext/rebase.py Tue May 31 22:50:01 2022 +0200 @@ -15,7 +15,6 @@ ''' -import errno import os from mercurial.i18n import _ @@ -1940,9 +1939,7 @@ f = repo.vfs(b"last-message.txt") collapsemsg = f.readline().strip() f.close() - except IOError as err: - if err.errno != errno.ENOENT: - raise + except FileNotFoundError: if isabort: # Oh well, just abort like normal collapsemsg = b''