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 <freku045@student.liu.se> Signed-off-by: Junio C Hamano <junkio@cox.net>
Fredrik Kuivinen committed
Nov 20, 2005 at 13:14 UTC
a6322d079b1d2e2cb72da1271171b35a173f3d22
1 file changed
+2
-2
git-merge-recursive.py
+2
-2
@@ -245,7 +245,7 @@ def updateFileExt(sha, mode, path, updateCache, updateWd):
245
246
try:
247
createDir = not stat.S_ISDIR(os.lstat(p).st_mode)
248
- except:
248
+ except OSError:
249
createDir = True
250
251
if createDir:
@@ -295,7 +295,7 @@ def removeFile(clean, path):
295
raise
296
try:
297
os.removedirs(os.path.dirname(path))
298
- except:
298
+ except OSError:
299
pass
300
301
def uniquePath(path, branch):