diff options
author | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-01-22 22:41:28 +0100 |
---|---|---|
committer | Raphaël Barrois <raphael.barrois@polytechnique.org> | 2014-01-22 22:43:16 +0100 |
commit | 497bee605dab138a89661228e071c4e7236c350a (patch) | |
tree | 5935b758c261144ddefc2683750f89e79e13deff | |
parent | fb794bd1bcfcb84ec82e72d4f9c3b67624724fdf (diff) | |
download | factory-boy-497bee605dab138a89661228e071c4e7236c350a.tar factory-boy-497bee605dab138a89661228e071c4e7236c350a.tar.gz |
Fix log_pprint for *args (Closes #127).
-rw-r--r-- | docs/changelog.rst | 2 | ||||
-rw-r--r-- | 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 <https://github.com/chsigi>`_ (:issue:`126`) - Don't crash when handling objects whose __repr__ is non-pure-ascii bytes on Py2, - discovered by `mbertheau <https://github.com/mbertheau>`_ (:issue:`123`) + discovered by `mbertheau <https://github.com/mbertheau>`_ (:issue:`123`) and `strycore <https://github.com/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() |