mailr21818 - /trunk/lib/spectrum/sparky.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on December 06, 2013 - 11:09:
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.




Related Messages


Powered by MHonArc, Updated Fri Dec 06 11:20:02 2013