summaryrefslogtreecommitdiff
path: root/factory/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'factory/utils.py')
-rw-r--r--factory/utils.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/factory/utils.py b/factory/utils.py
index 806b1ec..cfae4ec 100644
--- a/factory/utils.py
+++ b/factory/utils.py
@@ -35,7 +35,7 @@ def extract_dict(prefix, kwargs, pop=True, exclude=()):
Args:
prefix (str): the prefix to use for lookups
- kwargs (dict): the dict from which values should be extracted
+ kwargs (dict): the dict from which values should be extracted; WILL BE MODIFIED.
pop (bool): whether to use pop (True) or get (False)
exclude (iterable): list of prefixed keys that shouldn't be extracted
@@ -68,7 +68,7 @@ def multi_extract_dict(prefixes, kwargs, pop=True, exclude=()):
Args:
prefixes (str list): the prefixes to use for lookups
- kwargs (dict): the dict from which values should be extracted
+ kwargs (dict): the dict from which values should be extracted; WILL BE MODIFIED.
pop (bool): whether to use pop (True) or get (False)
exclude (iterable): list of prefixed keys that shouldn't be extracted
@@ -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)