mailr6510 - /1.3/relax_io.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on June 28, 2008 - 17:47:
Author: bugman
Date: Sat Jun 28 17:47:28 2008
New Revision: 6510

URL: http://svn.gna.org/viewcvs/relax?rev=6510&view=rev
Log:
Modified open_write_file() to catch and return objects with write methods.


Modified:
    1.3/relax_io.py

Modified: 1.3/relax_io.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/relax_io.py?rev=6510&r1=6509&r2=6510&view=diff
==============================================================================
--- 1.3/relax_io.py (original)
+++ 1.3/relax_io.py Sat Jun 28 17:47:28 2008
@@ -300,6 +300,11 @@
         # Nothing to do here!
         return file_name
 
+    # Something pretending to be a file object.
+    if hasattr(file_name, 'write'):
+        # Nothing to do here!
+        return file_name
+
     # The null device.
     if search('devnull', file_name):
         # Devnull could not be imported!




Related Messages


Powered by MHonArc, Updated Sat Jun 28 18:00:19 2008