Author: tlinnet
Date: Fri Dec  6 11:09:19 2013
New Revision: 21818

URL: http://svn.gna.org/viewcvs/relax?rev=21818&view=rev
Log:
Fix for issuing a warning when reading spins from a sparky formatted file.

Work in progress for Support Request #3044, 
(https://gna.org/support/index.php?3044) - Load spins from SPARKY list.

Modified:
    trunk/lib/spectrum/sparky.py

Modified: trunk/lib/spectrum/sparky.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/sparky.py?rev=21818&r1=21817&r2=21818&view=diff
==============================================================================
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 11:09:19 2013
@@ -27,10 +27,12 @@
 
 # Python module imports.
 from re import split
+from warnings import warn
 
 # relax module imports.
 from lib.errors import RelaxError
 from lib.io import open_write_file, strip
+from lib.warnings import RelaxWarning
 
 
 def read_list(peak_list=None, file_data=None):
@@ -135,7 +137,7 @@
         try:
             res_name = row1[-4]
         except:
-            raise RelaxWarning("Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None." % 
line[0])
+            raise warn(RelaxWarning("Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name.\nSetting residue name to None." % 
line[0]))
             res_name = None
 
         # Chemical shifts.


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to