2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-30 21:53:34 +08:00

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

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