summaryrefslogtreecommitdiff
path: root/gdb/python/py-value.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2010-08-23 20:27:48 +0000
committerTom Tromey <tromey@redhat.com>2010-08-23 20:27:48 +0000
commit815ca023125e4dc2e90938816c56e7ea1089191a (patch)
tree5d39d24d914b328647d2765cbc6109f561269f56 /gdb/python/py-value.c
parentebc2a8081dfb5113218d1d46e74d0325988f8744 (diff)
downloadgdb-815ca023125e4dc2e90938816c56e7ea1089191a.tar.gz
PR python/11391:
* python/py-value.c (valpy_nonzero): Don't throw error for other Value types.
Diffstat (limited to 'gdb/python/py-value.c')
-rw-r--r--gdb/python/py-value.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/gdb/python/py-value.c b/gdb/python/py-value.c
index d547ed1b172..75ee0de4db3 100644
--- a/gdb/python/py-value.c
+++ b/gdb/python/py-value.c
@@ -712,11 +712,8 @@ valpy_nonzero (PyObject *self)
TYPE_LENGTH (type),
gdbarch_byte_order (get_type_arch (type)));
else
- {
- PyErr_SetString (PyExc_TypeError, _("Attempted truth testing on invalid "
- "gdb.Value type."));
- return 0;
- }
+ /* All other values are True. */
+ return 1;
}
/* Implements ~ for value objects. */