gump-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aj...@apache.org
Subject cvs commit: gump/python/gump engine.py
Date Wed, 17 Mar 2004 05:00:16 GMT
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: general-unsubscribe@gump.apache.org
For additional commands, e-mail: general-help@gump.apache.org


Mime
View raw message