mailr7297 - /1.3/prompt/spin.py


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

Header


Content

Posted by edward on September 25, 2008 - 16:45:
Author: bugman
Date: Thu Sep 25 16:45:26 2008
New Revision: 7297

URL: http://svn.gna.org/viewcvs/relax?rev=7297&view=rev
Log:
Allowed the number arg in the spin.number() user function to be None.


Modified:
    1.3/prompt/spin.py

Modified: 1.3/prompt/spin.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/prompt/spin.py?rev=7297&r1=7296&r2=7297&view=diff
==============================================================================
--- 1.3/prompt/spin.py (original)
+++ 1.3/prompt/spin.py Thu Sep 25 16:45:26 2008
@@ -26,7 +26,7 @@
 # relax module imports.
 import help
 from generic_fns.mol_res_spin import copy_spin, create_spin, delete_spin, 
display_spin, id_string_doc, name_spin, number_spin
-from relax_errors import RelaxIntError, RelaxNoneStrError, RelaxStrError
+from relax_errors import RelaxIntError, RelaxNoneIntError, 
RelaxNoneStrError, RelaxStrError
 
 
 class Spin:
@@ -310,8 +310,8 @@
             raise RelaxNoneStrError, ('spin identification string', spin_id)
 
         # New spin number.
-        if type(number) != int:
-            raise RelaxIntError, ('new spin number', number)
+        if number != None and  type(number) != int:
+            raise RelaxNoneIntError, ('new spin number', number)
 
         # Execute the functional code.
         number_spin(spin_id=spin_id, number=number)




Related Messages


Powered by MHonArc, Updated Thu Sep 25 17:00:05 2008