Mercurial > hg > MakeItSo
comparison makeitso/makeitso.py @ 40:6b4c8f23192f
test and fix mixed output case
author | Jeff Hammel <jhammel@mozilla.com> |
---|---|
date | Sun, 02 Jan 2011 00:48:58 -0800 |
parents | a2cdce0108e1 |
children | 9956e13558dd |
comparison
equal
deleted
inserted
replaced
39:a2cdce0108e1 | 40:6b4c8f23192f |
---|---|
313 def _substitute(self, **variables): | 313 def _substitute(self, **variables): |
314 | 314 |
315 # determine where the hell to put these things | 315 # determine where the hell to put these things |
316 if self.output is None: | 316 if self.output is None: |
317 dirs = [i for i in self._templates if os.path.isdir(i)] | 317 dirs = [i for i in self._templates if os.path.isdir(i)] |
318 if not ((len(dirs) == 0) or len(dirs) == len(templates)): | 318 if not ((len(dirs) == 0) or len(dirs) == len(self.templates)): |
319 raise AssertionError("Must specify output when mixing directories and URIs") | 319 raise AssertionError("Must specify output when mixing directories and URIs") |
320 | 320 |
321 # TODO: check for missing | 321 # TODO: check for missing |
322 if len(self.templates) > 1 and not os.path.exists(self.output): | 322 if len(self.templates) > 1 and not os.path.exists(self.output): |
323 os.makedirs(self.output) | 323 os.makedirs(self.output) |