提交 ba1d0984 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix comparison of "borrow" flag.

This was causing lots of warnings to print in the buildbot. The error was introduced during a seemingly innocent PEP8 fix.
上级 332cd5d4
......@@ -294,7 +294,9 @@ class Param(object):
# mutable=True should require borrow=True. Raise warning when borrow is explicitely set
# to False with mutable=True.
if mutable:
if not borrow:
# Do not compare with "if not borrow", because borrow can be None,
# and "not None" would be True.
if borrow is False:
_logger.warning("Symbolic input for variable %s (name=%s) has "
"flags mutable=True, borrow=False. This combination is "
"incompatible since mutable=True implies that the "
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论