From: Fredrik Kuivinen Date: Sun, 20 Nov 2005 12:14:37 +0000 (+0100) Subject: merge-recursive: Replace 'except:' X-Git-Tag: v0.99.9k^2~48 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=a6322d079b1d2e2cb72da1271171b35a173f3d22;p=git.git merge-recursive: Replace 'except:' Plain except:s are evil as they will catch all kinds of exceptions including NameError and AttrubiteError. Signed-off-by: Fredrik Kuivinen Signed-off-by: Junio C Hamano --- diff --git a/git-merge-recursive.py b/git-merge-recursive.py index 37258ad77..012923355 100755 --- a/git-merge-recursive.py +++ b/git-merge-recursive.py @@ -245,7 +245,7 @@ def updateFileExt(sha, mode, path, updateCache, updateWd): try: createDir = not stat.S_ISDIR(os.lstat(p).st_mode) - except: + except OSError: createDir = True if createDir: @@ -295,7 +295,7 @@ def removeFile(clean, path): raise try: os.removedirs(os.path.dirname(path)) - except: + except OSError: pass def uniquePath(path, branch):