Author: bugman Date: Mon Jun 17 15:23:40 2013 New Revision: 20178 URL: http://svn.gna.org/viewcvs/relax?rev=20178&view=rev Log: The lib.io.open_write_file() function now catches file names of None and raises a RelaxError. This is useful for the GUI if the user forgets to select a file name. Modified: trunk/lib/io.py Modified: trunk/lib/io.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/io.py?rev=20178&r1=20177&r2=20178&view=diff ============================================================================== --- trunk/lib/io.py (original) +++ trunk/lib/io.py Mon Jun 17 15:23:40 2013 @@ -397,6 +397,10 @@ @rtype: writable file object (if return_path, then a tuple of the writable file and the full file path) """ + + # No file name? + if file_name == None: + raise RelaxError("The name of the file must be supplied.") # A file descriptor object. if is_filetype(file_name):