# HG changeset patch # User Vadim Gelfer # Date 1144961216 25200 # Node ID 547ede0123a2ea5d3ef072b5b563306793b31fa0 # Parent f1fda71e134ee1e975b11464e9c9f4bd514fc680 util.unlink should only catch OSError. diff -r f1fda71e134e -r 547ede0123a2 mercurial/util.py --- a/mercurial/util.py Thu Apr 13 13:46:05 2006 -0700 +++ b/mercurial/util.py Thu Apr 13 13:46:56 2006 -0700 @@ -373,8 +373,10 @@ """unlink and remove the directory if it is empty""" os.unlink(f) # try removing directories that might now be empty - try: os.removedirs(os.path.dirname(f)) - except: pass + try: + os.removedirs(os.path.dirname(f)) + except OSError: + pass def copyfiles(src, dst, hardlink=None): """Copy a directory tree using hardlinks if possible"""