From 20ad8b8b71f05efaa8647fc7d6b8cc7a299e25d0 Mon Sep 17 00:00:00 2001 From: mdipierro Date: Wed, 18 Jul 2012 14:20:46 -0500 Subject: [PATCH] missing pickling methods in Storage, thanks marius.v.niekerk --- VERSION | 2 +- gluon/storage.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d0bd9e17..6ce11129 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -Version 2.00.0 (2012-07-18 14:16:32) dev +Version 2.00.0 (2012-07-18 14:20:43) dev diff --git a/gluon/storage.py b/gluon/storage.py index a83067a4..d6a277ce 100644 --- a/gluon/storage.py +++ b/gluon/storage.py @@ -166,6 +166,12 @@ class Storage(dict): return value[-1] return None + def __getinitargs__(self): + return () + + def __getnewargs__(self): + return () + PICKABLE = (str,int,long,float,bool,list,dict,tuple,set) def PickleableStorage(data): return Storage(dict((k,v) for (k,v) in data.items() if isinstance(v,PICKABLE)))