Mercurial > hg
changeset 13279:eed22340b7aa
opener: check exception for ENOENT
author | Adrian Buehlmann <adrian@cadifra.com> |
---|---|
date | Tue, 11 Jan 2011 14:10:16 +0100 |
parents | e9a52ed28157 |
children | 6052bbc7aabd |
files | mercurial/util.py |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/util.py Tue Jan 11 14:10:16 2011 +0100 +++ b/mercurial/util.py Tue Jan 11 14:10:16 2011 +0100 @@ -919,7 +919,9 @@ fd = open(f) nlink = nlinks(f) fd.close() - except (OSError, IOError): + except (OSError, IOError), e: + if e.errno != errno.ENOENT: + raise nlink = 0 if not os.path.isdir(dirname): makedirs(dirname, self.createmode)