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>
This commit is contained in:
parent
9ae2172aed
commit
a6322d079b
@ -245,7 +245,7 @@ def updateFileExt(sha, mode, path, updateCache, updateWd):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
createDir = not stat.S_ISDIR(os.lstat(p).st_mode)
|
createDir = not stat.S_ISDIR(os.lstat(p).st_mode)
|
||||||
except:
|
except OSError:
|
||||||
createDir = True
|
createDir = True
|
||||||
|
|
||||||
if createDir:
|
if createDir:
|
||||||
@ -295,7 +295,7 @@ def removeFile(clean, path):
|
|||||||
raise
|
raise
|
||||||
try:
|
try:
|
||||||
os.removedirs(os.path.dirname(path))
|
os.removedirs(os.path.dirname(path))
|
||||||
except:
|
except OSError:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def uniquePath(path, branch):
|
def uniquePath(path, branch):
|
||||||
|
Loading…
Reference in New Issue
Block a user