From 8f36560d69e966600d69cdbf30c1e2374c46e530 Mon Sep 17 00:00:00 2001 From: j Date: Thu, 19 Dec 2019 13:16:58 +0200 Subject: [PATCH] use /tmp if media-cache is None/null, fixes #2794 --- pandora_client/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 3ae947c..04dc9d0 100755 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -251,7 +251,10 @@ class Client(object): return conn, conn.cursor() def media_cache(self): - return os.path.expanduser(self._config.get('media-cache', default_media_cache)) + path = self._config.get('media-cache', default_media_cache) + if path is None: + path = '/tmp/pandora_client_media_cache' + return os.path.expanduser(path) def get(self, key, default=None): conn, c = self._conn()