ajack 2004/03/16 21:00:15
Modified: python/gump engine.py
Log:
Check for pre-existence of directories in <mkdir, and warn (don't fail)
Revision Changes Path
1.91 +5 -2 gump/python/gump/engine.py
Index: engine.py
===================================================================
RCS file: /home/cvs/gump/python/gump/engine.py,v
retrieving revision 1.90
retrieving revision 1.91
diff -u -r1.90 -r1.91
--- engine.py 16 Mar 2004 23:56:41 -0000 1.90
+++ engine.py 17 Mar 2004 05:00:15 -0000 1.91
@@ -473,8 +473,11 @@
dirToMake=os.path.abspath(os.path.join(basedir,mkdir.dir))
try:
- os.makedirs(dirToMake)
- project.addInfo('Made directory ['+dirToMake+']')
+ if not os.path.exists(dirToMake):
+ os.makedirs(dirToMake)
+ project.addInfo('Made directory ['+dirToMake+']')
+ else:
+ project.addInfo('MkDir attempt on pre-existing directory
['+dirToMake+']')
except:
project.addError('Failed to make directory ['+dirToMake+']')
raise
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]