From 6f2125258ca97a291e954025b9718eec745ef217 Mon Sep 17 00:00:00 2001 From: whitequark Date: Wed, 14 Sep 2016 23:34:57 +0000 Subject: [PATCH] compiler: skip kernel_invariant linting for exception types. --- artiq/compiler/embedding.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/artiq/compiler/embedding.py b/artiq/compiler/embedding.py index d935c6197..7c6b7f617 100644 --- a/artiq/compiler/embedding.py +++ b/artiq/compiler/embedding.py @@ -740,6 +740,10 @@ class Stitcher: # specifications refers to ones we didn't encounter. for host_type in self.embedding_map.type_map: instance_type, constructor_type = self.embedding_map.type_map[host_type] + if not hasattr(instance_type, "constant_attributes"): + # Exceptions lack user-definable attributes. + continue + for attribute in instance_type.constant_attributes: if attribute in instance_type.attributes: # Fast path; if the ARTIQ Python type has the attribute, then every observed