mailr17232 - /trunk/relax_errors.py


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

Header


Content

Posted by edward on July 11, 2012 - 17:24:
Author: bugman
Date: Wed Jul 11 17:24:52 2012
New Revision: 17232

URL: http://svn.gna.org/viewcvs/relax?rev=17232&view=rev
Log:
Expanded RelaxNoInteratomError to handle the spin IDs as arguments, including 
these in the message.


Modified:
    trunk/relax_errors.py

Modified: trunk/relax_errors.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/relax_errors.py?rev=17232&r1=17231&r2=17232&view=diff
==============================================================================
--- trunk/relax_errors.py (original)
+++ trunk/relax_errors.py Wed Jul 11 17:24:52 2012
@@ -692,11 +692,15 @@
 
 # No interatomic data.
 class RelaxNoInteratomError(BaseError):
-    def __init__(self, pipe=None):
-        if pipe == None:
+    def __init__(self, spin_id1=None, spin_id2=None, pipe=None):
+        if spin_id1 and pipe:
+            self.text = "The interatomic data between the spins '%s' and 
'%s' for the data pipe '%s' does not exist." % (spin_id1, spin_id2, pipe)
+        elif spin_id1:
+            self.text = "The interatomic data between the spins '%s' and 
'%s' does not exist." % (spin_id1, spin_id2)
+        elif pipe:
+            self.text = "The interatomic data for the data pipe '%s' does 
not exist." % pipe
+        else:
             self.text = "The interatomic data does not exist."
-        else:
-            self.text = "The interatomic data for the data pipe " + 
repr(pipe) + " does not exist."
 
 # The interatomic data already exists.
 class RelaxInteratomError(BaseError):




Related Messages


Powered by MHonArc, Updated Wed Jul 11 18:20:02 2012