mailr5559 - /1.3/prompt/align_tensor.py


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

Header


Content

Posted by edward on April 10, 2008 - 17:20:
Author: bugman
Date: Thu Apr 10 17:01:35 2008
New Revision: 5559

URL: http://svn.gna.org/viewcvs/relax?rev=5559&view=rev
Log:
Converted the align_tensor.init() errors argument to a bool.


Modified:
    1.3/prompt/align_tensor.py

Modified: 1.3/prompt/align_tensor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/align_tensor.py?rev=5559&r1=5558&r2=5559&view=diff
==============================================================================
--- 1.3/prompt/align_tensor.py (original)
+++ 1.3/prompt/align_tensor.py Thu Apr 10 17:01:35 2008
@@ -26,7 +26,7 @@
 # relax module imports.
 import help
 from generic_fns import align_tensor
-from relax_errors import RelaxError, RelaxBinError, RelaxFloatError, 
RelaxIntError, RelaxNoneListstrError, RelaxNoneStrError, RelaxNumTupleError, 
RelaxStrError
+from relax_errors import RelaxError, RelaxBoolError, RelaxFloatError, 
RelaxIntError, RelaxNoneListstrError, RelaxNoneStrError, RelaxNumTupleError, 
RelaxStrError
 
 
 class Align_tensor:
@@ -176,7 +176,7 @@
         align_tensor.display(tensor=tensor)
 
 
-    def init(self, tensor=None, params=None, scale=1.0, angle_units='deg', 
param_types=0, errors=0):
+    def init(self, tensor=None, params=None, scale=1.0, angle_units='deg', 
param_types=0, errors=False):
         """Function for initialising the alignment tensor.
 
         Keyword Arguments
@@ -278,8 +278,8 @@
             raise RelaxIntError, ('parameter types', param_types)
 
         # The errors flag.
-        if type(errors) != int or (errors != 0 and errors != 1):
-            raise RelaxBinError, ('errors flag', errors)
+        if type(errors) != bool:
+            raise RelaxBoolError, ('errors flag', errors)
 
         # Execute the functional code.
         align_tensor.init(tensor=tensor, params=params, scale=scale, 
angle_units=angle_units, param_types=param_types, errors=errors)




Related Messages


Powered by MHonArc, Updated Thu Apr 10 17:40:12 2008