everything seems to work

This commit is contained in:
Mattias Andrée 2012-08-26 15:27:26 +02:00
parent 5d36c0edbe
commit 6b51b06e2d

30
ponysay
View file

@ -1631,63 +1631,63 @@ usekms = Ponysay.isUsingKMS()
'''
The directories where pony files are stored, ttyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
'''
set = set()
appendset = set()
ponydirs = []
if linuxvt and not usekms: _ponydirs = [HOME + '/.local/share/ponysay/ttyponies/', '/usr/share/ponysay/ttyponies/']
else: _ponydirs = [HOME + '/.local/share/ponysay/ponies/', '/usr/share/ponysay/ponies/']
for ponydir in _ponydirs:
if os.path.isdir(ponydir) and (ponydir not in set):
if os.path.isdir(ponydir) and (ponydir not in appendset):
ponydirs.append(ponydir)
set.add(ponydirs)
appendset.add(ponydir)
'''
The directories where pony files are stored, extrattyponies/ are used if the terminal is Linux VT (also known as TTY) and not with KMS
'''
set = set()
appendsetset = set()
extraponydirs = []
if linuxvt and not usekms: _extraponydirs = [HOME + '/.local/share/ponysay/extrattyponies/', '/usr/share/ponysay/extrattyponies/']
else: _extraponydirs = [HOME + '/.local/share/ponysay/extraponies/', '/usr/share/ponysay/extraponies/']
for extraponydir in _extraponydirs:
if os.path.isdir(extraponydir) and (extraponydir not in set):
if os.path.isdir(extraponydir) and (extraponydir not in appendset):
extraponydirs.append(extraponydir)
set.add(extraponydirs)
appendset.add(extraponydir)
'''
The directories where quotes files are stored
'''
set = set()
appendset = set()
quotedirs = []
_quotedirs = [HOME + '/.local/share/ponysay/quotes/', '/usr/share/ponysay/quotes/']
for quotedir in _quotedirs:
if os.path.isdir(quotedir) and (quotedir not in set):
if os.path.isdir(quotedir) and (quotedir not in appendset):
quotedirs.append(quotedir)
set.add(quotedirs)
appendset.add(quotedir)
'''
The directories where balloon style files are stored
'''
set = set()
appendset = set()
balloondirs = []
_balloondirs = [HOME + '/.local/share/ponysay/balloons/', '/usr/share/ponysay/balloons/']
for balloondir in _balloondirs:
if os.path.isdir(balloondir) and (balloondir not in set):
if os.path.isdir(balloondir) and (balloondir not in appendset):
balloondirs.append(balloondir)
set.add(balloondir)
appendset.add(balloondir)
'''
ucsmap files
'''
set = set()
appendset = set()
ucsmaps = []
_ucsmaps = [HOME + '/.local/share/ponysay/ucsmap', '/usr/share/ponysay/ucsmap']
for ucsmap in _ucsmaps:
if os.path.isdir(ucsmap) and (ucsmap not in set):
if os.path.isdir(ucsmap) and (ucsmap not in appendset):
ucsmaps.append(ucsmap)
set.add(ucsmap)
appendset.add(ucsmap)