mailr16504 - /branches/uf_redesign/specific_fns/api_objects.py


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

Header


Content

Posted by edward on May 29, 2012 - 11:37:
Author: bugman
Date: Tue May 29 11:37:45 2012
New Revision: 16504

URL: http://svn.gna.org/viewcvs/relax?rev=16504&view=rev
Log:
Fixes for the specific API param list object.

The add() method now checks that the py_type is given, and the 'select' and 
'fix' parameters are now
correctly added.


Modified:
    branches/uf_redesign/specific_fns/api_objects.py

Modified: branches/uf_redesign/specific_fns/api_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/specific_fns/api_objects.py?rev=16504&r1=16503&r2=16504&view=diff
==============================================================================
--- branches/uf_redesign/specific_fns/api_objects.py (original)
+++ branches/uf_redesign/specific_fns/api_objects.py Tue May 29 11:37:45 2012
@@ -59,8 +59,8 @@
 
         # Add some spin specific objects.
         if self.spin_data:
-            self.add('select', desc='The spin selection flag')
-            self.add('fixed', desc='The fixed flag')
+            self.add('select', scope='spin', desc='The spin selection flag', 
py_type=bool)
+            self.add('fixed', scope='spin', desc='The fixed flag', 
py_type=bool)
 
 
     def add(self, name, scope=None, string=None, default=None, units=None, 
desc=None, py_type=None, set='generic', conv_factor=None, grace_string=None, 
err=False, sim=False):
@@ -95,6 +95,8 @@
         # Check.
         if scope == None:
             raise RelaxError("The parameter scope must be set.")
+        if py_type == None:
+            raise RelaxError("The parameter type must be set.")
 
         # Add the values.
         self._names.append(name)




Related Messages


Powered by MHonArc, Updated Tue May 29 11:40:02 2012