From 497bee605dab138a89661228e071c4e7236c350a Mon Sep 17 00:00:00 2001 From: Raphaƫl Barrois Date: Wed, 22 Jan 2014 22:41:28 +0100 Subject: Fix log_pprint for *args (Closes #127). --- docs/changelog.rst | 2 +- factory/utils.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/changelog.rst b/docs/changelog.rst index 4609821..e75593e 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -11,7 +11,7 @@ ChangeLog - Fix badly written assert containing state-changing code, spotted by `chsigi `_ (:issue:`126`) - Don't crash when handling objects whose __repr__ is non-pure-ascii bytes on Py2, - discovered by `mbertheau `_ (:issue:`123`) + discovered by `mbertheau `_ (:issue:`123`) and `strycore `_ (:issue:`127`) .. _v2.3.0: diff --git a/factory/utils.py b/factory/utils.py index b27fd77..276977a 100644 --- a/factory/utils.py +++ b/factory/utils.py @@ -113,7 +113,7 @@ def _safe_repr(obj): def log_pprint(args=(), kwargs=None): kwargs = kwargs or {} return ', '.join( - [repr(arg) for arg in args] + + [_safe_repr(arg) for arg in args] + [ '%s=%s' % (key, _safe_repr(value)) for key, value in kwargs.items() -- cgit v1.2.3