summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaphaël Barrois <raphael.barrois@polytechnique.org>2016-02-09 23:45:19 +0000
committerRaphaël Barrois <raphael.barrois@polytechnique.org>2016-02-09 23:45:19 +0000
commitfb63040a2f32df4851fc576a56825a6c6b9c1853 (patch)
treed19952d46215a47f04927a6f530850c51e112aec
parent36d2a606e822e5d2f45418ac1d525e4e2fbb388d (diff)
parente320cabc58bdb637f24d4b20df8c318a7420a55e (diff)
downloadfactory-boy-fb63040a2f32df4851fc576a56825a6c6b9c1853.tar
factory-boy-fb63040a2f32df4851fc576a56825a6c6b9c1853.tar.gz
Merge pull request #129 from anentropic/master
Make safe repr more safe
-rw-r--r--factory/utils.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/factory/utils.py b/factory/utils.py
index 806b1ec..15dba0a 100644
--- a/factory/utils.py
+++ b/factory/utils.py
@@ -101,7 +101,7 @@ def import_object(module_name, attribute_name):
def _safe_repr(obj):
try:
obj_repr = repr(obj)
- except UnicodeError:
+ except Exception:
return '<bad_repr object at %s>' % id(obj)
try: # Convert to "text type" (= unicode)