From df5cb29bc582c0a32803a8e4317bf41ef4e27aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mattias=20Andr=C3=A9e?= Date: Sat, 22 Dec 2012 00:27:00 +0100 Subject: [PATCH] bug fix: failed if a environment variable was not defined MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- ponysay.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ponysay.py b/ponysay.py index c4651c9b..e8812f31 100755 --- a/ponysay.py +++ b/ponysay.py @@ -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/',