From: Eli Bendersky Date: Sat, 7 Jan 2012 18:44:43 +0000 (+0200) Subject: Fix Container's __pretty_str__ to use str instead of repr. This provides more consist... X-Git-Tag: v0.20~10 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=745621241cc4924939c5401ad7cfd9fe267d60a8;p=pyelftools.git Fix Container's __pretty_str__ to use str instead of repr. This provides more consistent output across platforms for integers. Patch by Jessica McKellar --- diff --git a/elftools/construct/lib/container.py b/elftools/construct/lib/container.py index 326ee57..eb4b738 100644 --- a/elftools/construct/lib/container.py +++ b/elftools/construct/lib/container.py @@ -73,7 +73,7 @@ class Container(object): if hasattr(v, "__pretty_str__"): text.append(v.__pretty_str__(nesting + 1, indentation)) else: - text.append(repr(v)) + text.append(str(v)) attrs.append("".join(text)) if not attrs: return "%s()" % (self.__class__.__name__,)