Don't choke on non-existing macros
[geekigeeki.git] / geekigeeki.py
index a7e99ed10121c9af816cfc76eddc0707edeeec94..6c77adf56231ba1c68ccd4d33dc896d25bb2422b 100755 (executable)
@@ -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)