From: <pj...@us...> - 2011-02-12 01:50:44
|
Revision: 7197 http://jython.svn.sourceforge.net/jython/?rev=7197&view=rev Author: pjenvey Date: 2011-02-12 01:50:38 +0000 (Sat, 12 Feb 2011) Log Message: ----------- ensure files are closed on close() even after PySystemState.cleanup has been called. this is an evil situation to be calling python code in, but it doesn't hurt us to close the file anyway and this partly fixes #1701 Modified Paths: -------------- trunk/jython/src/org/python/core/PyFile.java Modified: trunk/jython/src/org/python/core/PyFile.java =================================================================== --- trunk/jython/src/org/python/core/PyFile.java 2011-02-11 14:11:26 UTC (rev 7196) +++ trunk/jython/src/org/python/core/PyFile.java 2011-02-12 01:50:38 UTC (rev 7197) @@ -590,9 +590,8 @@ /** For closing directly */ public void close() { - if (sys.unregisterCloser(this)) { - file.close(); - } + sys.unregisterCloser(this); + file.close(); sys = null; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |