Author: bugman Date: Tue Oct 6 12:56:53 2009 New Revision: 9577 URL: http://svn.gna.org/viewcvs/relax?rev=9577&view=rev Log: Added a check to see if the file is empty to read_spin_data_file(). 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=9577&r1=9576&r2=9577&view=diff ============================================================================== --- 1.3/relax_io.py (original) +++ 1.3/relax_io.py Tue Oct 6 12:56:53 2009 @@ -46,7 +46,7 @@ # relax module imports. from generic_fns.mol_res_spin import generate_spin_id_data_array -from relax_errors import RelaxError, RelaxFileError, RelaxFileOverwriteError, RelaxMissingBinaryError, RelaxNoInPathError, RelaxNonExecError +from relax_errors import RelaxError, RelaxFileError, RelaxFileEmptyError, RelaxFileOverwriteError, RelaxMissingBinaryError, RelaxNoInPathError, RelaxNonExecError from relax_warnings import RelaxWarning @@ -537,6 +537,10 @@ # Strip the data of all comments and empty lines. file_data = strip(file_data) + # No data! + if not file_data: + raise RelaxFileEmptyError + # Test the validity of the data. if data_col or error_col: missing = True