Author: bugman Date: Wed Mar 9 17:05:49 2011 New Revision: 12804 URL: http://svn.gna.org/viewcvs/relax?rev=12804&view=rev Log: Improved the RelaxWarning for the reading of NMRView peaks with missing assignments. This is in response to bug #17876 (http://gna.org/bugs/?17876) submitted by Elio Cino <herfworm att gmail dot com>. Modified: 1.3/generic_fns/spectrum.py Modified: 1.3/generic_fns/spectrum.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/spectrum.py?rev=12804&r1=12803&r2=12804&view=diff ============================================================================== --- 1.3/generic_fns/spectrum.py (original) +++ 1.3/generic_fns/spectrum.py Wed Mar 9 17:05:49 2011 @@ -746,6 +746,11 @@ # Loop over the file data. data = [] for line in file_data: + # Unknown assignment. + if line[1] == '{}': + warn(RelaxWarning("The assignment '%s' is unknown, skipping this peak." % line[1])) + continue + # The residue number res_num = '' try: