From 89a34b574ee86b77fbae5295c766471086b9ea8f Mon Sep 17 00:00:00 2001 From: Kotresh HR Date: Thu, 6 Jun 2019 12:54:04 +0530 Subject: tests/utils: Fix py2/py3 util python scripts Following files are fixed. tests/bugs/distribute/overlap.py tests/utils/changelogparser.py tests/utils/create-files.py tests/utils/gfid-access.py tests/utils/libcxattr.py Change-Id: I3db857cc19e19163d368d913eaec1269fbc37140 updates: bz#1193929 Signed-off-by: Kotresh HR --- tests/utils/changelogparser.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'tests/utils/changelogparser.py') diff --git a/tests/utils/changelogparser.py b/tests/utils/changelogparser.py index e8e252d195f..3b8f81d1bad 100644 --- a/tests/utils/changelogparser.py +++ b/tests/utils/changelogparser.py @@ -125,7 +125,10 @@ class Record(object): return repr(self.__dict__) def __str__(self): - return unicode(self).encode('utf-8') + if sys.version_info >= (3,): + return self.__unicode__() + else: + return unicode(self).encode('utf-8') def get_num_tokens(data, tokens, version=Version.V11): -- cgit