Revert "Use highes available protocol for cPickle"

This reverts commit 32d8083b60.
This commit is contained in:
croneter 2019-01-25 17:30:03 +01:00
parent 2ee3d86c27
commit 211d3d6a5a

View file

@ -1,7 +1,7 @@
#!/usr/bin/env python #!/usr/bin/env python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, unicode_literals from __future__ import absolute_import, division, unicode_literals
import cPickle from cPickle import dumps, loads
from xbmcgui import Window from xbmcgui import Window
from xbmc import log, LOGDEBUG from xbmc import log, LOGDEBUG
@ -52,8 +52,7 @@ def pickle_me(obj, window_var='plex_result'):
functions won't work. See the Pickle documentation functions won't work. See the Pickle documentation
""" """
log('%sStart pickling' % PREFIX, level=LOGDEBUG) log('%sStart pickling' % PREFIX, level=LOGDEBUG)
pickl_window(window_var, value=cPickle.dumps(obj, pickl_window(window_var, value=dumps(obj))
protocol=cPickle.HIGHEST_PROTOCOL))
log('%sSuccessfully pickled' % PREFIX, level=LOGDEBUG) log('%sSuccessfully pickled' % PREFIX, level=LOGDEBUG)
@ -65,7 +64,7 @@ def unpickle_me(window_var='plex_result'):
result = pickl_window(window_var) result = pickl_window(window_var)
pickl_window(window_var, clear=True) pickl_window(window_var, clear=True)
log('%sStart unpickling' % PREFIX, level=LOGDEBUG) log('%sStart unpickling' % PREFIX, level=LOGDEBUG)
obj = cPickle.loads(result) obj = loads(result)
log('%sSuccessfully unpickled' % PREFIX, level=LOGDEBUG) log('%sSuccessfully unpickled' % PREFIX, level=LOGDEBUG)
return obj return obj