From 1cc7c7309d25bd9c26c09824ec9898e8ee22e5dd Mon Sep 17 00:00:00 2001 From: protolambda Date: Wed, 5 Jun 2019 18:28:09 +0200 Subject: [PATCH] change to issubclass, hope parametrized external type is ok --- test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py index 8c2fc359c..4944fb600 100644 --- a/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py +++ b/test_libs/pyspec/eth2spec/utils/ssz/ssz_typing.py @@ -249,7 +249,7 @@ class Vector(metaclass=VectorMeta): # cannot check non-type objects if isinstance(cls.elem_type, type): for i, item in enumerate(self.items): - if not isinstance(item, cls.elem_type): + if not issubclass(type(item), cls.elem_type): raise TypeError("Typed vector cannot hold differently typed value" " at index %d. Got type: %s, expected type: %s" % (i, type(item), cls.elem_type))