diff options
author | Kotresh HR <khiremat@redhat.com> | 2019-06-06 12:54:04 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-07 08:49:27 +0000 |
commit | 89a34b574ee86b77fbae5295c766471086b9ea8f (patch) | |
tree | b802fd8a0e4b5f4c73cc2505ff8d2d5fa649ce77 /tests/utils/changelogparser.py | |
parent | a981e7cc12bb89304e8736d857f23f3a394512d0 (diff) |
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 <khiremat@redhat.com>
Diffstat (limited to 'tests/utils/changelogparser.py')
-rw-r--r-- | tests/utils/changelogparser.py | 5 |
1 files changed, 4 insertions, 1 deletions
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): |