mailr17000 - /branches/interatomic/relax_errors.py


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

Header


Content

Posted by edward on June 20, 2012 - 11:26:
Author: bugman
Date: Wed Jun 20 11:26:25 2012
New Revision: 17000

URL: http://svn.gna.org/viewcvs/relax?rev=17000&view=rev
Log:
Expanded RelaxMultiSpinIDError to be able to print out a list of all the 
matching spin Ids.


Modified:
    branches/interatomic/relax_errors.py

Modified: branches/interatomic/relax_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/interatomic/relax_errors.py?rev=17000&r1=16999&r2=17000&view=diff
==============================================================================
--- branches/interatomic/relax_errors.py (original)
+++ branches/interatomic/relax_errors.py Wed Jun 20 11:26:25 2012
@@ -613,9 +613,13 @@
 
 # Multiple spins matching the ID.
 class RelaxMultiSpinIDError(BaseError):
-    def __init__(self, id):
-        if id == '':
+    def __init__(self, id, id_list=None):
+        if id_list != None and id == '':
+            self.text = "The empty spin ID corresponds to multiple spins - 
%s." % id_list
+        elif id_list == None and id == '':
             self.text = "The empty spin ID corresponds to more than a single 
spin in the current data pipe."
+        elif id_list != None:
+            self.text = "The spin ID '%s' corresponds to multiple spins - 
%s." % (id, id_list)
         else:
             self.text = "The spin ID '%s' corresponds to more than a single 
spin in the current data pipe." % id
 




Related Messages


Powered by MHonArc, Updated Wed Jun 20 13:40:02 2012