Author: bugman Date: Mon Jan 25 20:36:30 2010 New Revision: 10326 URL: http://svn.gna.org/viewcvs/relax?rev=10326&view=rev Log: Modified read_spin_data() to throw a warning rather than error when an empty file is encountered. 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=10326&r1=10325&r2=10326&view=diff ============================================================================== --- 1.3/relax_io.py (original) +++ 1.3/relax_io.py Mon Jan 25 20:36:30 2010 @@ -48,8 +48,8 @@ # relax module imports. import generic_fns from generic_fns.mol_res_spin import generate_spin_id_data_array -from relax_errors import RelaxError, RelaxFileError, RelaxFileEmptyError, RelaxFileOverwriteError, RelaxInvalidSeqError, RelaxMissingBinaryError, RelaxNoInPathError, RelaxNonExecError -from relax_warnings import RelaxWarning +from relax_errors import RelaxError, RelaxFileError, RelaxFileOverwriteError, RelaxInvalidSeqError, RelaxMissingBinaryError, RelaxNoInPathError, RelaxNonExecError +from relax_warnings import RelaxWarning, RelaxFileEmptyWarning @@ -540,7 +540,8 @@ # No data! if not file_data: - raise RelaxFileEmptyError + warn(RelaxFileEmptyWarning(file)) + return # Yield the data, spin by spin. missing_data = True