Revision 4492
Added by Aaron Marcuse-Kubitza over 12 years ago
parallelproc.py | ||
---|---|---|
11 | 11 |
import dicts |
12 | 12 |
import exc |
13 | 13 |
from Runnable import Runnable |
14 |
import strings |
|
14 | 15 |
|
15 | 16 |
def try_pickle(value): |
16 | 17 |
try: cPickle.dumps(value) |
17 | 18 |
except Exception, e: |
18 |
exc.add_msg(e, 'Tried to pickle: '+repr(value)) |
|
19 |
exc.add_msg(e, 'Tried to pickle: '+strings.urepr(value))
|
|
19 | 20 |
raise |
20 | 21 |
|
21 | 22 |
def prepickle(value, vars_id_dict_): |
Also available in: Unified diff
Replaced repr() with strings.urepr() (or equivalent) everywhere needed, to avoid future UnicodeEncodeErrors