From f1e040123f523639eaddf54de63ca86531eca18f Mon Sep 17 00:00:00 2001 From: Max Zwiessele Date: Fri, 4 Sep 2015 16:09:18 +0100 Subject: [PATCH] Revert "[caching] different error" This reverts commit f7087ebc9003a6950b58533e0ce373c03c82a4a2. --- GPy/util/caching.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/GPy/util/caching.py b/GPy/util/caching.py index 42a3d0f6..196ce343 100644 --- a/GPy/util/caching.py +++ b/GPy/util/caching.py @@ -149,12 +149,10 @@ class Cacher(object): return Cacher(self.operation, self.limit, self.ignore_args, self.force_kwargs) def __getstate__(self, memo=None): - from pickle import PicklingError - raise PicklingError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation))) + raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation))) def __setstate__(self, memo=None): - from pickle import PicklingError - raise PicklingError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation))) + raise NotImplementedError("Trying to pickle Cacher object with function {}, pickling functions not possible.".format(str(self.operation))) @property def __name__(self):