merge-recursive: Replace 'except:'
authorFredrik Kuivinen <freku045@student.liu.se>
Sun, 20 Nov 2005 12:14:37 +0000 (13:14 +0100)
committerJunio C Hamano <junkio@cox.net>
Sun, 20 Nov 2005 18:47:16 +0000 (10:47 -0800)
Plain except:s are evil as they will catch all kinds of exceptions
including NameError and AttrubiteError.

Signed-off-by: Fredrik Kuivinen <freku045@student.liu.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-merge-recursive.py
index 37258ad77481fb0edaf2b084b7be173d8da8c586..01292335509bfd1460e12e0e1d86c4fcd1f265a4 100755 (executable)
@@ -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):