提交 6066c74d 编写于 作者: C Cleber Rosa

avocado.utils.astring: ignore "undefined" unicode

Depending on the Python version stack being used *by inspekt*, it
can produce this error:

   Syntax check FAIL
   ************* Module avocado.utils.astring
   E0602:305,32: is_text: Undefined variable 'unicode'

Let's disable that check, since that variable is a reserved word
that should always exist in Python 2.7, for which a conditional
exists.
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 2974776f
......@@ -302,7 +302,7 @@ def is_text(data):
each character.
"""
if sys.version_info[0] < 3:
return isinstance(data, unicode)
return isinstance(data, unicode) # pylint: disable=E0602
return isinstance(data, str)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册