mailRe: r21811 - /trunk/lib/spectrum/sparky.py


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

Header


Content

Posted by Edward d'Auvergne on December 06, 2013 - 10:07:
Hi,

You need to replace the 'raise' statement here with a call to the
'warn()' function.  Just grep the source code to find how
RelaxWarnings are used.

Regards,

Edward



On 6 December 2013 09:57,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Fri Dec  6 09:57:13 2013
New Revision: 21811

URL: http://svn.gna.org/viewcvs/relax?rev=21811&view=rev
Log:
Issuing a warning instead of error when loading spins from sparky list 
where residue names are not present.

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=21811&r1=21810&r2=21811&view=diff
==============================================================================
--- trunk/lib/spectrum/sparky.py (original)
+++ trunk/lib/spectrum/sparky.py Fri Dec  6 09:57:13 2013
@@ -134,7 +134,8 @@
         try:
             res_name = row1[-4]
         except:
-            raise RelaxError("Improperly formatted Sparky file, cannot 
process the assignment '%s' for residue name." % line[0])
+            raise 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.
         w1 = None


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

This is the relax-commits mailing list
relax-commits@xxxxxxx

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



Related Messages


Powered by MHonArc, Updated Fri Dec 06 11:40:08 2013