# HG changeset patch # User Adrian Buehlmann # Date 2011-01-11 13:10:16 # Node ID eed22340b7aaa426cf55baad2d6fc3079e3fa22f # Parent e9a52ed28157900e1cba4fd304779a68549ec416 opener: check exception for ENOENT diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -919,7 +919,9 @@ class opener(object): 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)