Mercurial > public > mercurial-scm > hg-stable
diff mercurial/revlogutils/nodemap.py @ 46321:d32e7ed81f4f
persistent-nodemap: catch the right exception on python
On Python 2, Missing file are IOError, not OSError, apparently.
Differential Revision: https://phab.mercurial-scm.org/D9809
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Sun, 17 Jan 2021 19:22:30 +0100 |
parents | 28899b6f4480 |
children | 98c816e89fac 83f037acf71a |
line wrap: on
line diff
--- a/mercurial/revlogutils/nodemap.py Sun Jan 17 02:50:26 2021 -0500 +++ b/mercurial/revlogutils/nodemap.py Sun Jan 17 19:22:30 2021 +0100 @@ -56,7 +56,7 @@ data = util.buffer(util.mmapread(fd, data_length)) else: data = fd.read(data_length) - except OSError as e: + except (IOError, OSError) as e: if e.errno == errno.ENOENT: return None else: