Minor fix (user reported problem via email)

This commit is contained in:
Miroslav Stampar
2014-05-29 09:33:14 +02:00
parent 0f10cdfa4c
commit 27ebc02535
2 changed files with 7 additions and 2 deletions

View File

@@ -48,7 +48,11 @@ def base64pickle(value):
warnMsg += "instance of a type '%s'" % type(value)
singleTimeWarnMessage(warnMsg)
retVal = base64encode(pickle.dumps(str(value), pickle.HIGHEST_PROTOCOL))
try:
retVal = base64encode(pickle.dumps(value))
except:
retVal = base64encode(pickle.dumps(str(value), pickle.HIGHEST_PROTOCOL))
return retVal
def base64unpickle(value):