devices/runtime_exceptions: fix exception_map generation

This commit is contained in:
Sebastien Bourdeauducq 2014-09-29 18:08:58 +08:00
parent 035b541a73
commit 4572b7657f
1 changed files with 4 additions and 1 deletions

View File

@ -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")}