[PATCH 2/2] Output binary data correctly as hexa strings (#986515)

Brian C. Lane bcl at redhat.com
Tue Jul 23 00:10:53 UTC 2013


On Mon, Jul 22, 2013 at 02:27:25PM +0200, Vratislav Podzimek wrote:
> ---
>  meh/dump.py               | 12 +++++++++---
>  meh/safe_string.py        | 12 ++++++++++--
>  tests/handle_binary.py    | 19 +++++++++++++++++--
>  tests/safe_string_test.py |  3 ++-
>  4 files changed, 38 insertions(+), 8 deletions(-)
> 
> diff --git a/meh/dump.py b/meh/dump.py
> index 3cb2202..37a0698 100644
> --- a/meh/dump.py
> +++ b/meh/dump.py
> @@ -352,7 +352,9 @@ class ExceptionDump(object):
>                          ret += self._dumpClass(item, level + 1, skipList=skipList)
>                  ret += "]\n"
>              elif type(value) == types.DictType:
> -                ret += "%s%s: {" % (pad, curkey)
> +                ret += pad
> +                ret += curkey
> +                ret += ": {"

You could also do all that on one line, may be more readable.

ret = ret + pad + curkey + ": {"

Looks good though, ACK.

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 482 bytes
Desc: not available
URL: <https://lists.fedorahosted.org/pipermail/anaconda-patches/attachments/20130722/ece8a7d5/attachment.sig>


More information about the anaconda-patches mailing list