From 38274b2d787c040caf49902f9e374375dcc459ca Mon Sep 17 00:00:00 2001 From: stevenknight Date: Wed, 9 Oct 2002 21:06:16 +0000 Subject: [PATCH] Allow build/doc/version.sgml to be created on build even if the build/doc/ subdirectory doesn't exist. git-svn-id: http://scons.tigris.org/svn/scons/trunk@477 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- doc/SConscript | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/doc/SConscript b/doc/SConscript index 229cf25c..29801efc 100644 --- a/doc/SConscript +++ b/doc/SConscript @@ -1,8 +1,6 @@ # # SConscript file for building SCons documentation. # -# THIS IS NOT READY YET. DO NOT TRY TO BUILD SCons WITH ITSELF YET. -# # # Copyright (c) 2001, 2002 Steven Knight @@ -109,8 +107,13 @@ if jw: verfile = str(File("version.sgml")) try: os.unlink(verfile) - except: - pass + except OSError: + pass # okay if the file didn't exist + dir, f = os.path.split(verfile) + try: + os.makedirs(dir) + except OSError: + pass # okay if the directory already exists open(verfile, "w").write(""" -- 2.26.2