manually adapt few imports
This commit is contained in:
+6
-9
@@ -12,11 +12,7 @@ Provides:
|
||||
- Storage; like dictionary allowing also for `obj.foo` for `obj['foo']`
|
||||
"""
|
||||
|
||||
try:
|
||||
import cPickle as pickle
|
||||
except:
|
||||
import pickle
|
||||
import copy_reg
|
||||
from gluon._compat import copyreg, pickle, PY2
|
||||
import gluon.portalocker as portalocker
|
||||
|
||||
__all__ = ['List', 'Storage', 'Settings', 'Messages',
|
||||
@@ -139,10 +135,11 @@ class Storage(dict):
|
||||
def pickle_storage(s):
|
||||
return Storage, (dict(s),)
|
||||
|
||||
copy_reg.pickle(Storage, pickle_storage)
|
||||
|
||||
PICKABLE = (str, int, long, float, bool, list, dict, tuple, set)
|
||||
|
||||
copyreg.pickle(Storage, pickle_storage)
|
||||
if PY2:
|
||||
PICKABLE = (str, int, long, float, bool, list, dict, tuple, set)
|
||||
else:
|
||||
PICKABLE = (str, int, float, bool, list, dict, tuple, set)
|
||||
|
||||
class StorageList(Storage):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user