From 8fa0abf830ef3c8e97846cef0986589b49bcfe6f Mon Sep 17 00:00:00 2001 From: Luke Diamand Date: Fri, 8 Jun 2018 21:32:47 +0100 Subject: [PATCH] git-p4: narrow the scope of exceptions caught when parsing an int The current code traps all exceptions around some code which parses an integer, and then talks to Perforce. That can result in errors from Perforce being ignored. Change the code to only catch the integer conversion exceptions. Signed-off-by: Luke Diamand Signed-off-by: Junio C Hamano --- git-p4.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/git-p4.py b/git-p4.py index 90377263fe..37265fc31d 100755 --- a/git-p4.py +++ b/git-p4.py @@ -948,7 +948,7 @@ def p4ChangesForPaths(depotPaths, changeRange, requestedBlockSize): try: (changeStart, changeEnd) = p4ParseNumericChangeRange(parts) block_size = chooseBlockSize(requestedBlockSize) - except: + except ValueError: changeStart = parts[0][1:] changeEnd = parts[1] if requestedBlockSize: