bug fix: failed if a environment variable was not defined

Signed-off-by: Mattias Andrée <maandree@operamail.com>
This commit is contained in:
Mattias Andrée 2012-12-22 00:27:00 +01:00
parent 49b3f80f8a
commit df5cb29bc5

View file

@ -198,7 +198,11 @@ class Ponysay():
def share(file):
return [(parsefile(item) + file) for item in [
def cat(a, b):
if a is None:
return None
return a + b
return [cat(parsefile(item), file) for item in [
'$XDG_DATA_HOME/ponysay/',
'$HOME/.local/share/ponysay/',
'/usr/share/ponysay/',