提交 ba70231b authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix gh-5312

上级 b9c3556f
...@@ -161,7 +161,7 @@ class MetaObject(type): ...@@ -161,7 +161,7 @@ class MetaObject(type):
if props is not None: if props is not None:
if not isinstance(props, tuple): if not isinstance(props, tuple):
raise TypeError("__props__ has to be a tuple") raise TypeError("__props__ has to be a tuple")
if not all(isinstance(p, str) for p in props): if not all(isinstance(p, string_types) for p in props):
raise TypeError("elements of __props__ have to be strings") raise TypeError("elements of __props__ have to be strings")
def _props(self): def _props(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论