From 72e50ff5af654cdc50eb10cb468f9d6e3e79a3a1 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 10 Jun 2013 14:52:06 -0400 Subject: [PATCH] Make dump-properties a bit more error-resilient --- examples/dump-properties.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/dump-properties.py b/examples/dump-properties.py index 68d937a5..824a7505 100644 --- a/examples/dump-properties.py +++ b/examples/dump-properties.py @@ -22,7 +22,10 @@ def print_info(obj, info_cls): cl.device_partition_property_ext.to_string(v, "<unknown device partition property %d>") for v in info_value])) else: - print("%s: %s" % (info_name, info_value)) + try: + print("%s: %s" % (info_name, info_value)) + except: + print("%s: <error>") % info_name for platform in cl.get_platforms(): print(75*"=") -- GitLab