From 6eaec96af7cab1dc521bf1c4d684ecf3375a76ec Mon Sep 17 00:00:00 2001 From: pictuga Date: Wed, 22 Jan 2014 15:56:08 +0100 Subject: [PATCH] Keep "dic" param in Cache.new --- morss/morss.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/morss/morss.py b/morss/morss.py index 0cbdb44..13f82ce 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -197,9 +197,12 @@ class Cache: return time.time() - os.path.getmtime(self._file) < sec - def new(self, key, persistent=False, dic=False): + def new(self, key, persistent=False, dic=None): """ Returns a Cache object in the same directory """ if key != self._key: + if dic is None: + dic = self._dic + return Cache(self._dir, key, persistent, dic) else: return self