[Python-checkins] cpython (3.4): test_gdb: oops, the regex to parse the gdb version was still too strict
victor.stinner
python-checkins at python.org
Thu Sep 3 16:20:48 CEST 2015
https://hg.python.org/cpython/rev/29fa1d33e421
changeset: 97622:29fa1d33e421
branch: 3.4
parent: 97617:11b6ac84d151
user: Victor Stinner <victor.stinner at gmail.com>
date: Thu Sep 03 15:42:26 2015 +0200
summary:
test_gdb: oops, the regex to parse the gdb version was still too strict
files:
Lib/test/test_gdb.py | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/Lib/test/test_gdb.py b/Lib/test/test_gdb.py
--- a/Lib/test/test_gdb.py
+++ b/Lib/test/test_gdb.py
@@ -36,8 +36,9 @@
# Regex to parse:
# 'GNU gdb (GDB; SUSE Linux Enterprise 12) 7.7\n' -> 7.7
# 'GNU gdb (GDB) Fedora 7.9.1-17.fc22\n' -> 7.9
- # 'GNU gdb 6.1.1 [FreeBSD]\n'
- match = re.search("^GNU gdb.*? (\d+)\.(\d)", version)
+ # 'GNU gdb 6.1.1 [FreeBSD]\n' -> 6.1
+ # 'GNU gdb (GDB) Fedora (7.5.1-37.fc18)\n' -> 7.5
+ match = re.search(r"^GNU gdb.*?\b(\d+)\.(\d)", version)
if match is None:
raise Exception("unable to parse GDB version: %r" % version)
return (version, int(match.group(1)), int(match.group(2)))
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list