From 595c47244b0bfce3023c14908c0cc6b6bb4e0aec Mon Sep 17 00:00:00 2001 From: anentropic Date: Mon, 3 Feb 2014 14:19:42 +0000 Subject: Make safe repr more safe --- factory/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'factory') diff --git a/factory/utils.py b/factory/utils.py index 276977a..7b48a1e 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: return '' % id(obj) try: # Convert to "text type" (= unicode) -- cgit v1.2.3