add fallback for missing save_cache_path
python-xdg on sle11 lacks save_cache_path so add fallback. Needed for changelog-checker which runs on sle11 atm.
This commit is contained in:
parent
710ac59ba1
commit
bc9cce65dd
@ -25,7 +25,16 @@ except:
|
||||
import pickle
|
||||
|
||||
|
||||
from xdg.BaseDirectory import save_cache_path
|
||||
try:
|
||||
from xdg.BaseDirectory import save_cache_path
|
||||
except ImportError:
|
||||
from xdg.BaseDirectory import xdg_cache_home
|
||||
def save_cache_path(*name):
|
||||
path = os.path.join(xdg_cache_home, *name)
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path)
|
||||
return path
|
||||
|
||||
# Where the cache files are stored
|
||||
CACHEDIR = save_cache_path('opensuse-repo-checker')
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user