summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2019-04-14 19:04:56 (GMT)
committerMats Wichmann <mats@linux.com>2019-04-14 19:04:56 (GMT)
commit8fe02cb3bae12fefd95770a7caf411a520965ba5 (patch)
tree9363b78e8c33ab8b6878f89231cdfdc65824c556 /test
parenta2a1fede9770daee1ff6d14d8870000640343fde (diff)
downloadSCons-8fe02cb3bae12fefd95770a7caf411a520965ba5.zip
SCons-8fe02cb3bae12fefd95770a7caf411a520965ba5.tar.gz
SCons-8fe02cb3bae12fefd95770a7caf411a520965ba5.tar.bz2
[PR #3352] fix sider complaints: bare except
Sider in the CI system doesn't like the change which added a try/except block for a version without a dot. This was copied from a different file, so to fix the complaint, four instances are actually updated to "except ValueError" - I am assuming that this is the only thing that could go wrong, a version string cannot be converted with int(foo), which would throw ValueError. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'test')
-rw-r--r--test/Java/RMIC.py4
-rw-r--r--test/Repository/RMIC.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/Java/RMIC.py b/test/Java/RMIC.py
index 021f666..c8848e9 100644
--- a/test/Java/RMIC.py
+++ b/test/Java/RMIC.py
@@ -102,13 +102,13 @@ if java_version.count('.') == 1:
major, minor = java_version.split('.')
try:
curver = (int(major), int(minor))
- except:
+ except ValueError:
pass
elif java_version.count('.') == 0:
# java 11?
try:
curver = (int(java_version), 0)
- except:
+ except ValueError:
pass
# Check the version of the found Java compiler.
diff --git a/test/Repository/RMIC.py b/test/Repository/RMIC.py
index 3eeab9b..aa4a57e 100644
--- a/test/Repository/RMIC.py
+++ b/test/Repository/RMIC.py
@@ -44,13 +44,13 @@ if java_version.count('.') == 1:
major, minor = java_version.split('.')
try:
curver = (int(major), int(minor))
- except:
+ except ValueError:
pass
elif java_version.count('.') == 0:
# java 11?
try:
curver = (int(java_version), 0)
- except:
+ except ValueError:
pass
# Check the version of the found Java compiler.