Message5144

Author gaddo
Recipients gaddo
Date 2009-09-13.14:38:28
SpamBayes Score 2.6472665e-06
Marked as misclassified No
Message-id <1252852709.29.0.353655237199.issue1466@psf.upfronthosting.co.za>
In-reply-to
Content
jython does not respect the append flag to 
open, causing data loss.

this is on linux.

stracing jython, i can se that the file
is opened O_APPEND in cpython but is not
with jython 

i discovered this bug while trying to run
mercuria with jython.

gaddo@enterprise:~/jython$ ./jython 
Jython 2.5.0 (Release_2_5_0:6476, Jun 16 2009, 13:33:26) 
[OpenJDK Client VM (Sun Microsystems Inc.)] on java1.6.0_0
Type "help", "copyright", "credits" or "license" for more information.
>>> fd = open('test', 'ab')
>>> fd.write('test1\n')
>>> fd2 = open('test','ab')
>>> fd2.write('test2\n')
>>> quit()
gaddo@enterprise:~/jython$ cat test
test2
History
Date User Action Args
2009-09-13 14:38:29gaddosetrecipients: + gaddo
2009-09-13 14:38:29gaddosetmessageid: <1252852709.29.0.353655237199.issue1466@psf.upfronthosting.co.za>
2009-09-13 14:38:29gaddolinkissue1466 messages
2009-09-13 14:38:28gaddocreate