From 66b2df8eb7d394827902cf5dc33450491cdb61d8 Mon Sep 17 00:00:00 2001 From: Bernie Innocenti Date: Sun, 30 Nov 2008 19:34:17 -0500 Subject: [PATCH] Don't choke on non-existing macros --- geekigeeki.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/geekigeeki.py b/geekigeeki.py index a7e99ed..6c77adf 100755 --- a/geekigeeki.py +++ b/geekigeeki.py @@ -366,7 +366,11 @@ class WikiFormatter: macro = globals().get('_macro_' + name) if not macro: - execfile("macros/" + name + ".py", globals()) + try: + execfile("macros/" + name + ".py", globals()) + except IOError, er: + if er.errno == errno.ENOENT: + pass macro = globals().get('_macro_' + name) if macro: return macro(argv) -- 2.25.1