]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fixes bpo-29680: Older gdb does not have gdb.error. (GH-363) (GH-534)
authorMariatta <Mariatta@users.noreply.github.com>
Tue, 7 Mar 2017 10:44:11 +0000 (02:44 -0800)
committerGitHub <noreply@github.com>
Tue, 7 Mar 2017 10:44:11 +0000 (02:44 -0800)
This change is required to make python-dbg.py compatible with GDB versions before 7.3.
(cherry picked from commit 661ca8843fed1183e38db06e52d59ac300bf1c2a)

Tools/gdb/libpython.py

index cc1afbe16d01d17a37e0b9caf6cbcbb7e2719b03..d28851f9fd7f276ef0fb5964914ad37f57e69592 100755 (executable)
@@ -714,7 +714,7 @@ class PyDictObjectPtr(PyObjectPtr):
         try:
             # <= Python 3.5
             return keys['dk_entries'], dk_size
-        except gdb.error:
+        except RuntimeError:
             # >= Python 3.6
             pass