From: <nr...@us...> - 2008-08-03 07:42:27
|
Revision: 5065 http://jython.svn.sourceforge.net/jython/?rev=5065&view=rev Author: nriley Date: 2008-08-03 07:42:24 +0000 (Sun, 03 Aug 2008) Log Message: ----------- Fix mistaken assumption that 'r+' will create a file. Modified Paths: -------------- branches/asm/Lib/os.py Modified: branches/asm/Lib/os.py =================================================================== --- branches/asm/Lib/os.py 2008-08-03 05:11:47 UTC (rev 5064) +++ branches/asm/Lib/os.py 2008-08-03 07:42:24 UTC (rev 5065) @@ -581,9 +581,11 @@ if not creating and not path.exists(filename): raise OSError(errno.ENOENT, errno.strerror(errno.ENOENT), filename) - if not writing or updating: - # Default to reading - reading = True + if not writing: + if updating: + writing = True + else: + reading = True if truncating and not writing: # Explicitly truncate, writing will truncate anyway This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |