提交 976013ea authored 作者: Frederic's avatar Frederic

Be more strict in the exception we catch

上级 04e8afee
...@@ -557,8 +557,9 @@ class FunctionGraph(utils.object2): ...@@ -557,8 +557,9 @@ class FunctionGraph(utils.object2):
""" """
try: try:
# Why do we catch the exeception anyway?
self._features.remove(feature) self._features.remove(feature)
except Exception: except ValueError:
return return
detach = getattr(feature, 'on_detach', None) detach = getattr(feature, 'on_detach', None)
if detach is not None: if detach is not None:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论