[Cppunit-cvs] cppunit2/devtools syncwithjsoncpp.py,1.1,1.2
Brought to you by:
blep
From: Baptiste L. <bl...@us...> - 2006-09-01 19:31:35
|
Update of /cvsroot/cppunit/cppunit2/devtools In directory sc8-pr-cvs4.sourceforge.net:/tmp/cvs-serv16670/devtools Modified Files: syncwithjsoncpp.py Log Message: - fixed bug (failure when target file did not exist). Index: syncwithjsoncpp.py =================================================================== RCS file: /cvsroot/cppunit/cppunit2/devtools/syncwithjsoncpp.py,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** syncwithjsoncpp.py 5 Jun 2006 13:22:58 -0000 1.1 --- syncwithjsoncpp.py 1 Sep 2006 19:31:32 -0000 1.2 *************** *** 34,42 **** dest_path = os.path.join( target_dir, os.path.split(source)[1] ) print ' => Copying %s to %s' % (source,dest_path) ! os.unlink( dest_path ) shutil.copyfile( source, dest_path ) else: print 'Direct file copy %s to %s' % (source_dir,target_dir) ! os.unlink( target_dir ) shutil.copyfile( source_dir, target_dir ) --- 34,44 ---- dest_path = os.path.join( target_dir, os.path.split(source)[1] ) print ' => Copying %s to %s' % (source,dest_path) ! if os.path.exists( dest_path ): ! os.unlink( dest_path ) shutil.copyfile( source, dest_path ) else: print 'Direct file copy %s to %s' % (source_dir,target_dir) ! if os.path.exists( target_dir ): ! os.unlink( target_dir ) shutil.copyfile( source_dir, target_dir ) |