From 99bc5eab46983bf20e92f5aaf1de26fed260157e Mon Sep 17 00:00:00 2001 From: j Date: Fri, 23 Oct 2009 20:33:34 +0200 Subject: [PATCH] create folder for cache --- oxlib/cache.py | 5 ++++- setup.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/oxlib/cache.py b/oxlib/cache.py index affe828..e6a1a49 100644 --- a/oxlib/cache.py +++ b/oxlib/cache.py @@ -98,7 +98,10 @@ def _getCacheBase(): return os.environ.get('oxCACHE', os.path.expanduser('~/.ox/cache')) def _getCacheDB(): - return os.path.join(_getCacheBase(), "cache.sqlite") + path = _getCacheBase() + if not os.path.exists(os.path.dirname(path)): + os.makedirs(os.path.exists(os.path.dirname(path))) + return os.path.join(path, "cache.sqlite") def _connectDb(): conn = sqlite3.connect(_getCacheDB(), timeout=10) diff --git a/setup.py b/setup.py index 6296567..a878320 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ setup( download_url="http://code.0xdb.org/python-oxlib/download", license="GPLv3", packages=['oxlib'], - zip_safe=False, keywords = [ ], classifiers = [