Use or set the DATADIR environment variable

related to e93d724ed1
This commit is contained in:
Laurent Bachelier 2015-07-17 16:31:27 +02:00
commit adc4cd2c1c
5 changed files with 6 additions and 2 deletions

View file

@ -49,8 +49,8 @@ class Weboobmc():
yield backend['Name'] # , self.get_backend_icon(backend['Module'])
def get_backend_icon(self, module):
if 'WEBOOB_WORKDIR' in os.environ:
datadir = os.environ.get('WEBOOB_WORKDIR')
if 'WEBOOB_DATADIR' in os.environ:
datadir = os.environ.get('WEBOOB_DATADIR')
else:
datadir = os.path.join(os.environ.get('XDG_DATA_HOME',
os.path.join(os.path.expanduser('~'), '.local', 'share')