comparison piecrust/processing/requirejs.py @ 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 4850f8c21b6e
comparison
equal deleted inserted replaced
117:6827dcc9d3fb 118:e5f048799d61
34 self._conf.setdefault('out_path', self._conf['build_path']) 34 self._conf.setdefault('out_path', self._conf['build_path'])
35 35
36 def onPipelineStart(self, pipeline): 36 def onPipelineStart(self, pipeline):
37 super(RequireJSProcessor, self).onPipelineStart(pipeline) 37 super(RequireJSProcessor, self).onPipelineStart(pipeline)
38 38
39 if self._conf is None:
40 return
41
39 logger.debug("Adding Javascript suppressor to build pipeline.") 42 logger.debug("Adding Javascript suppressor to build pipeline.")
40 skip = _JavascriptSkipProcessor(self._conf['build_path']) 43 skip = _JavascriptSkipProcessor(self._conf['build_path'])
41 pipeline.processors.append(skip) 44 pipeline.processors.append(skip)
42 45
43 def matches(self, path): 46 def matches(self, path):
47 if self._conf is None:
48 return False
44 return path == self._conf['build_path'] 49 return path == self._conf['build_path']
45 50
46 def getDependencies(self, path): 51 def getDependencies(self, path):
47 return FORCE_BUILD 52 return FORCE_BUILD
48 53