]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_gdb: fix regex to parse the GDB version
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Sep 2015 22:22:55 +0000 (00:22 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 14 Sep 2015 22:22:55 +0000 (00:22 +0200)
Fix the regex to support the version 7.10: minor version with two digits

Lib/test/test_gdb.py

index 915c90cc69f8dbc370b95a48e240a98b2bcb9d5d..b5017b9a01de509f92581499d715f0ffa95f508f 100644 (file)
@@ -38,7 +38,7 @@ def get_gdb_version():
     # 'GNU gdb (GDB) Fedora 7.9.1-17.fc22\n' -> 7.9
     # '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)
+    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)))