From be1a2c291f9f7821eefdb9b1731087b0665903ce Mon Sep 17 00:00:00 2001 From: j Date: Tue, 20 Oct 2015 12:16:02 +0200 Subject: [PATCH] use tempfile.gettempdir --- pandora_client/__init__.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandora_client/__init__.py b/pandora_client/__init__.py index 7cb9d0e..231631b 100755 --- a/pandora_client/__init__.py +++ b/pandora_client/__init__.py @@ -13,6 +13,7 @@ import os import socket import sqlite3 import sys +import tempfile import time import pkg_resources from urlparse import urlparse @@ -951,7 +952,8 @@ class API(ox.API): if not self.media_cache: self.media_cache = os.path.expanduser(default_media_cache) netloc = urlparse(self.url).netloc - self._resume_file = '/tmp/pandora_client.%s.%s.json' % (os.environ.get('USER'), netloc) + tmp = tempfile.gettempdir() + self._resume_file = os.path.join(tmp, 'pandora_client.%s.%s.json' % (os.environ.get('USER'), netloc)) def async(self, action, data, interval=5): t = r = getattr(self, action)(data)