]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
test_gdb: fix regex to parse GDB version for 'GNU gdb 6.1.1 [FreeBSD]\n'
authorVictor Stinner <victor.stinner@gmail.com>
Thu, 3 Sep 2015 07:45:53 +0000 (09:45 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Thu, 3 Sep 2015 07:45:53 +0000 (09:45 +0200)
Lib/test/test_gdb.py

index 664d08c8e4ad84fc2d954bae4f06fd9da97368e8..5059fb43a44df25fdbe2170b8a47bd84ff233490 100644 (file)
@@ -36,7 +36,8 @@ def get_gdb_version():
     # 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
-    match = re.search("^GNU gdb .*? (\d+)\.(\d)", version)
+    # 'GNU gdb 6.1.1 [FreeBSD]\n'
+    match = re.search("^GNU gdb.*? (\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)))