Commit d5aa32b7 authored by Janez K's avatar Janez K
Browse files

Merge branch 'master' into dev

parents bd8e557b c502bb88
This diff is collapsed.
#!/usr/bin/env python
# Copyright (C) <2014> Janez Kranjc
import os, sys
if __name__ == '__main__':
......
......@@ -58,9 +58,9 @@ def dbsafe_encode(value, compress_object=False, pickle_protocol=DEFAULT_PROTOCOL
#import traceback
#traceback.print_stack()
if not compress_object:
value = b64encode(dumps(deepcopy(value), pickle_protocol))
value = b64encode(dumps(value, pickle_protocol))
else:
value = b64encode(compress(dumps(deepcopy(value), pickle_protocol)))
value = b64encode(compress(dumps(value, pickle_protocol)))
return PickledObject(value)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment