From 6066c74d790a91ef599658fa7130e2cf7c534782 Mon Sep 17 00:00:00 2001 From: Cleber Rosa Date: Tue, 24 Apr 2018 12:30:06 -0400 Subject: [PATCH] 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: Cleber Rosa --- avocado/utils/astring.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/avocado/utils/astring.py b/avocado/utils/astring.py index 17f0de56..f8d34d61 100644 --- a/avocado/utils/astring.py +++ b/avocado/utils/astring.py @@ -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) -- GitLab