summaryrefslogtreecommitdiff
path: root/git-p4.py
diff options
context:
space:
mode:
authorLuke Diamand <luke@diamand.org>2018-06-08 20:32:47 (GMT)
committerJunio C Hamano <gitster@pobox.com>2018-06-12 21:46:09 (GMT)
commit8fa0abf830ef3c8e97846cef0986589b49bcfe6f (patch)
tree8bfa5c6619ea2ce7b4ef0b0e5cfcef3bbeef1974 /git-p4.py
parent55bb3e3611c7b3f7bbbaf8d9ce98a4ed4196c3eb (diff)
downloadgit-8fa0abf830ef3c8e97846cef0986589b49bcfe6f.zip
git-8fa0abf830ef3c8e97846cef0986589b49bcfe6f.tar.gz
git-8fa0abf830ef3c8e97846cef0986589b49bcfe6f.tar.bz2
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 <luke@diamand.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-p4.py')
-rwxr-xr-xgit-p4.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-p4.py b/git-p4.py
index 9037726..37265fc 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: