From 4572b7657f6b748e244303b5a190513e06533fe0 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Mon, 29 Sep 2014 18:08:58 +0800 Subject: [PATCH] devices/runtime_exceptions: fix exception_map generation --- artiq/devices/runtime_exceptions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/artiq/devices/runtime_exceptions.py b/artiq/devices/runtime_exceptions.py index c9b631010..c9a90b697 100644 --- a/artiq/devices/runtime_exceptions.py +++ b/artiq/devices/runtime_exceptions.py @@ -1,3 +1,5 @@ +import inspect + from artiq.language.core import RuntimeException @@ -12,5 +14,6 @@ class RTIOUnderflow(RuntimeException): exception_map = {e.eid: e for e in globals().values() - if isinstance(e, RuntimeException.__class__) + if inspect.isclass(e) + and issubclass(e, RuntimeException) and hasattr(e, "eid")}