use tempfile.gettempdir
This commit is contained in:
parent
d731cc528c
commit
be1a2c291f
1 changed files with 3 additions and 1 deletions
|
@ -13,6 +13,7 @@ import os
|
||||||
import socket
|
import socket
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import sys
|
import sys
|
||||||
|
import tempfile
|
||||||
import time
|
import time
|
||||||
import pkg_resources
|
import pkg_resources
|
||||||
from urlparse import urlparse
|
from urlparse import urlparse
|
||||||
|
@ -951,7 +952,8 @@ class API(ox.API):
|
||||||
if not self.media_cache:
|
if not self.media_cache:
|
||||||
self.media_cache = os.path.expanduser(default_media_cache)
|
self.media_cache = os.path.expanduser(default_media_cache)
|
||||||
netloc = urlparse(self.url).netloc
|
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):
|
def async(self, action, data, interval=5):
|
||||||
t = r = getattr(self, action)(data)
|
t = r = getattr(self, action)(data)
|
||||||
|
|
Loading…
Reference in a new issue