mailr21817 - /trunk/lib/spectrum/nmrpipe.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:17 2013
New Revision: 21817

URL: http://svn.gna.org/viewcvs/relax?rev=21817&view=rev
Log:
Fix for issuing a warning in reading spins from a NMRPipe SeriesTab 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/nmrpipe.py

Modified: trunk/lib/spectrum/nmrpipe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/lib/spectrum/nmrpipe.py?rev=21817&r1=21816&r2=21817&view=diff
==============================================================================
--- trunk/lib/spectrum/nmrpipe.py (original)
+++ trunk/lib/spectrum/nmrpipe.py Fri Dec  6 11:09:17 2013
@@ -25,10 +25,12 @@
 
 # Python module imports.
 import re
+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_seriestab(peak_list=None, file_data=None, int_col=None):
@@ -118,14 +120,14 @@
         try:
             res_name1 = row1[-4]
         except:
-            raise RelaxWarning("Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 1.\nSetting 
residue name to None." % line[0])
+            raise warn(RelaxWarning("Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 
1.\nSetting residue name to None." % line[0]))
             res_name1 = None
 
         # The residue name for dimension 2.
         try:
             res_name2 = row2[-4]
         except:
-            raise RelaxWarning("Improperly formatted NMRPipe SeriesTab file, 
cannot process the assignment '%s' for residue name dimension 2.\nSetting 
residue name to None." % line[0])
+            raise warn(RelaxWarning("Improperly formatted NMRPipe SeriesTab 
file, cannot process the assignment '%s' for residue name dimension 
2.\nSetting residue name to None." % line[0]))
             res_name2 = None
 
         # Get the intensities.




Related Messages


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