From bfd52070711259c2b3c42824e25f53395b304bd1 Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Tue, 21 Jul 2020 18:10:17 -0700 Subject: [PATCH] gyb: special case list for conversion In order to deal with encoding conversions for Python 2 and Python 3, the string had to be passed through CStringIO for Python 2. On Python 3, the strings are unicode. --- utils/gyb.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/gyb.py b/utils/gyb.py index 5f3cbf16ef670..2e2c3d9fb573f 100755 --- a/utils/gyb.py +++ b/utils/gyb.py @@ -737,7 +737,7 @@ def execute(self, context): result_string = None if isinstance(result, Number) and not isinstance(result, Integral): result_string = repr(result) - elif isinstance(result, Integral): + elif isinstance(result, Integral) or isinstance(result, list): result_string = str(result) else: result_string = StringIO(result).read()