提交 c46c79cc 编写于 作者: C Cleber Rosa

Python 3.8 support: fix SyntaxWarning on avocado.utils.cpu

We're checking for identity with literal integers.  Let's fix the

 SyntaxWarning: "is" with a literal. Did you mean "=="

given by Python 3.8 and later.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 7832f93b
......@@ -245,9 +245,9 @@ def _legacy_disable(value):
TODO: this should be removed in the near future
Reference: https://trello.com/c/aJzNUeA5/
'''
if value is 0:
if value == 0:
return b'0'
if value is 1:
if value == 1:
return b'1'
return _bool_to_binary(value)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册