changeset 118:e5f048799d61

Don't stupidly crash in the RequireJS processor.
author Ludovic Chabant <ludovic@chabant.com>
date Wed, 29 Oct 2014 08:19:29 -0700
parents 6827dcc9d3fb
children 0811f92cbdc7
files piecrust/processing/requirejs.py
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/processing/requirejs.py	Tue Oct 28 08:20:38 2014 -0700
+++ b/piecrust/processing/requirejs.py	Wed Oct 29 08:19:29 2014 -0700
@@ -36,11 +36,16 @@
     def onPipelineStart(self, pipeline):
         super(RequireJSProcessor, self).onPipelineStart(pipeline)
 
+        if self._conf is None:
+            return
+
         logger.debug("Adding Javascript suppressor to build pipeline.")
         skip = _JavascriptSkipProcessor(self._conf['build_path'])
         pipeline.processors.append(skip)
 
     def matches(self, path):
+        if self._conf is None:
+            return False
         return path == self._conf['build_path']
 
     def getDependencies(self, path):