From: Bernie Innocenti Date: Mon, 1 Dec 2008 00:34:17 +0000 (-0500) Subject: Don't choke on non-existing macros X-Git-Tag: v3.0~6 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=66b2df8eb7d394827902cf5dc33450491cdb61d8;p=geekigeeki.git Don't choke on non-existing macros --- 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)