mirror of https://github.com/tLDP/python-tldp
perform the processor prebuild check first
it is smarter to perform the non-destructive check first, rather than blowing away the output directory and then reporting that it is impossible to rebuild the document output tree
This commit is contained in:
parent
fe520cd583
commit
36e92b83d9
|
@ -154,19 +154,21 @@ class BaseDoctype(object):
|
||||||
|
|
||||||
# -- the output directory gets to prepare; must return True
|
# -- the output directory gets to prepare; must return True
|
||||||
#
|
#
|
||||||
if not self.output.hook_prebuild():
|
|
||||||
return False
|
|
||||||
|
|
||||||
opwd = os.getcwd()
|
|
||||||
os.chdir(self.output.dirname)
|
|
||||||
|
|
||||||
# -- the processor gets to prepare; must return True
|
# -- the processor gets to prepare; must return True
|
||||||
#
|
#
|
||||||
if not self.build_precheck():
|
if not self.build_precheck():
|
||||||
logger.warning("%s %s failed (%s), skipping to next build",
|
logger.warning("%s %s failed (%s), skipping to next build",
|
||||||
'build_precheck', stem, classname)
|
stem, 'build_precheck', classname)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
if not self.output.hook_prebuild():
|
||||||
|
logger.warning("%s %s failed (%s), skipping to next build",
|
||||||
|
stem, 'hook_prebuild', classname)
|
||||||
|
return False
|
||||||
|
|
||||||
|
opwd = os.getcwd()
|
||||||
|
os.chdir(self.output.dirname)
|
||||||
|
|
||||||
# -- now, we can try to build everything; this is the BIG WORK!
|
# -- now, we can try to build everything; this is the BIG WORK!
|
||||||
#
|
#
|
||||||
result = self.buildall()
|
result = self.buildall()
|
||||||
|
|
Loading…
Reference in New Issue