[PATCH 2/2] Output binary data correctly as hexa strings (#986515)
Vratislav Podzimek
vpodzime at redhat.com
Tue Jul 23 09:03:05 UTC 2013
On Mon, 2013-07-22 at 17:10 -0700, Brian C. Lane wrote:
> 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 + ": {"
I was thinking about it, but I'm afraid it's quite error prone. However,
I'll add a comment why things are appended one after another. Changing
locally and pushing.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic
More information about the anaconda-patches
mailing list