From 9aea7394ae8694658a78f41b238371adafd410db Mon Sep 17 00:00:00 2001 From: Radim Kolar <> Date: Thu, 10 Sep 2009 17:09:30 +0200 Subject: [PATCH] corrected check for sgmlfmt availability --- site_scons/sgmldoc.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/site_scons/sgmldoc.py b/site_scons/sgmldoc.py index 3d4f034..4bcf710 100644 --- a/site_scons/sgmldoc.py +++ b/site_scons/sgmldoc.py @@ -6,12 +6,18 @@ # from SCons.Script import ARGUMENTS,Touch,Delete +import os def checkForSGMLFMT(check): """Returns True if we have working sgmlfmt executable for building documentation.""" check.Message("Checking for working sgmlfmt... ") Touch('empty') + Delete('empty.html') rc,out=check.TryAction("sgmlfmt -d docbook -f html empty") + if os.path.isfile('empty.html'): + rc = 0 + else: + rc = 127 Delete(['empty','empty.html']) if rc == 0: check.Result(True)