Permalink
Browse files

Merge branch 'master' of github.com:mythmon/wok

  • Loading branch information...
2 parents 8c7f970 + 067f8d6 commit fce8c0f672bb324c022773a57f86f6b2b4584606 Mike Cooper committed Mar 13, 2012
Showing with 8 additions and 3 deletions.
  1. +8 −3 wok/engine.py
View
@@ -111,7 +111,7 @@ def __init__(self, output_lvl=1):
self.options['media_dir'],
self.options['template_dir'],
self.options['content_dir']
- ],
+ ],
change_handler=self.generate_site)
server.run()
@@ -179,8 +179,13 @@ def load_hooks(self):
import __hooks__
self.hooks = __hooks__.hooks
logging.info('Loaded {0} hooks: {0}'.format(self.hooks))
- except ImportError:
- logging.info('No hooks module found.')
+ except ImportError as e:
+ if "__hooks__" in str(e):
+ logging.info('No hooks module found.')
+ else:
+ # don't catch import errors raised within a hook
+ logging.info('Import error within hooks.')
+ raise ImportError(e)
def run_hook(self, hook_name, *args):
""" Run specified hooks if they exist """

0 comments on commit fce8c0f

Please sign in to comment.