mailr17611 - in /trunk: generic_fns/ specific_fns/ test_suite/system_tests/scripts/diff_tensor/ test_suite/system_tests/scripts/...


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

Header


Content

Posted by edward on September 28, 2012 - 18:50:
Author: bugman
Date: Fri Sep 28 18:50:32 2012
New Revision: 17611

URL: http://svn.gna.org/viewcvs/relax?rev=17611&view=rev
Log:
Python 3 preparation - all raising of RelaxErrors is now Python 2.4+ 
compatible.


Modified:
    trunk/generic_fns/angles.py
    trunk/generic_fns/pcs.py
    trunk/generic_fns/rdc.py
    trunk/specific_fns/n_state_model.py
    trunk/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py
    trunk/test_suite/system_tests/scripts/diff_tensor/tensor_opt.py
    trunk/test_suite/system_tests/scripts/n_state_model/populations.py

Modified: trunk/generic_fns/angles.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/angles.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/generic_fns/angles.py (original)
+++ trunk/generic_fns/angles.py Fri Sep 28 18:50:32 2012
@@ -126,9 +126,9 @@
 
     # Check the bounds and window.
     if theta_window - (theta_upper - theta_lower) > 1e-7:
-        raise RelaxError, "The theta angle lower and upper bounds [%s, %s] 
do not match the window size of %s." % (theta_lower, theta_upper, 
theta_window)
+        raise RelaxError("The theta angle lower and upper bounds [%s, %s] do 
not match the window size of %s." % (theta_lower, theta_upper, theta_window))
     if phi_window - (phi_upper - phi_lower) > 1e-7:
-        raise RelaxError, "The phi angle lower and upper bounds [%s, %s] do 
not match the window size of %s." % (phi_lower, phi_upper, phi_window)
+        raise RelaxError("The phi angle lower and upper bounds [%s, %s] do 
not match the window size of %s." % (phi_lower, phi_upper, phi_window))
 
     # First wrap the angles.
     theta = wrap_angles(theta, theta_lower, theta_upper, theta_window)
@@ -181,7 +181,7 @@
 
     # Check the bounds and window.
     if window - (upper - lower) > 1e-7:
-        raise RelaxError, "The lower and upper bounds [%s, %s] do not match 
the window size of %s." % (lower, upper, window)
+        raise RelaxError("The lower and upper bounds [%s, %s] do not match 
the window size of %s." % (lower, upper, window))
 
     # Keep wrapping until the angle is within the limits.
     while True:

Modified: trunk/generic_fns/pcs.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/pcs.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/generic_fns/pcs.py (original)
+++ trunk/generic_fns/pcs.py Fri Sep 28 18:50:32 2012
@@ -50,7 +50,7 @@
 
     # Arg check.
     if align_id and align_id not in cdp.align_ids:
-        raise RelaxError, "The alignment ID '%s' is not in the alignment ID 
list %s." % (align_id, cdp.align_ids)
+        raise RelaxError("The alignment ID '%s' is not in the alignment ID 
list %s." % (align_id, cdp.align_ids))
 
     # Convert the align IDs to an array, or take all IDs.
     if align_id:

Modified: trunk/generic_fns/rdc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/generic_fns/rdc.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/generic_fns/rdc.py (original)
+++ trunk/generic_fns/rdc.py Fri Sep 28 18:50:32 2012
@@ -53,7 +53,7 @@
 
     # Arg check.
     if align_id and align_id not in cdp.align_ids:
-        raise RelaxError, "The alignment ID '%s' is not in the alignment ID 
list %s." % (align_id, cdp.align_ids)
+        raise RelaxError("The alignment ID '%s' is not in the alignment ID 
list %s." % (align_id, cdp.align_ids))
 
     # Convert the align IDs to an array, or take all IDs.
     if align_id:

Modified: trunk/specific_fns/n_state_model.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/specific_fns/n_state_model.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/specific_fns/n_state_model.py (original)
+++ trunk/specific_fns/n_state_model.py Fri Sep 28 18:50:32 2012
@@ -1047,11 +1047,11 @@
 
             # Check.
             if unit_vect[rdc_index] != None and len(unit_vect[rdc_index]) != 
num:
-                raise RelaxError, "The number of interatomic vectors for all 
no match:\n%s" % unit_vect
+                raise RelaxError("The number of interatomic vectors for all 
no match:\n%s" % unit_vect)
 
         # Missing unit vectors.
         if num == None:
-            raise RelaxError, "No interatomic vectors could be found."
+            raise RelaxError("No interatomic vectors could be found.")
 
         # Update None entries.
         for i in range(len(unit_vect)):

Modified: trunk/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py 
(original)
+++ trunk/test_suite/system_tests/scripts/diff_tensor/ri_back_calc.py Fri Sep 
28 18:50:32 2012
@@ -47,7 +47,7 @@
 elif ds.diff_type == 'ellipsoid':
     diffusion_tensor.init((8.3333333333333335e-09, 15000000.0, 
0.33333333333333331, 1.0, 2.0, 0.5), angle_units='rad', fixed=False)
 else:
-    raise RelaxError, "The diffusion type '%s' is unknown." % ds.diff_type
+    raise RelaxError("The diffusion type '%s' is unknown." % ds.diff_type)
 
 # Create the proton spins.
 sequence.attach_protons()

Modified: trunk/test_suite/system_tests/scripts/diff_tensor/tensor_opt.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/diff_tensor/tensor_opt.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/diff_tensor/tensor_opt.py (original)
+++ trunk/test_suite/system_tests/scripts/diff_tensor/tensor_opt.py Fri Sep 
28 18:50:32 2012
@@ -44,7 +44,7 @@
 elif ds.diff_type == 'ellipsoid':
     diffusion_tensor.init((8.3333333333333335e-09, 15000000.0, 
0.33333333333333331, 1.0, 2.0, 0.5), angle_units='rad', fixed=False)
 else:
-    raise RelaxError, "The diffusion type '%s' is unknown." % ds.diff_type
+    raise RelaxError("The diffusion type '%s' is unknown." % ds.diff_type)
 
 # Create the proton spins.
 sequence.attach_protons()

Modified: trunk/test_suite/system_tests/scripts/n_state_model/populations.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/n_state_model/populations.py?rev=17611&r1=17610&r2=17611&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/n_state_model/populations.py 
(original)
+++ trunk/test_suite/system_tests/scripts/n_state_model/populations.py Fri 
Sep 28 18:50:32 2012
@@ -84,7 +84,7 @@
 self._execute_uf(uf_name='calc')
 print("Chi2: %s" % cdp.chi2)
 if abs(cdp.chi2) > 1e-15:
-    raise RelaxError, "The chi2 at the solution is not zero!"
+    raise RelaxError("The chi2 at the solution is not zero!")
 
 
 # The population model opt.




Related Messages


Powered by MHonArc, Updated Fri Sep 28 19:00:02 2012