mailr9491 - /1.3/generic_fns/pipes.py


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

Header


Content

Posted by edward on September 10, 2009 - 16:53:
Author: bugman
Date: Thu Sep 10 16:53:06 2009
New Revision: 9491

URL: http://svn.gna.org/viewcvs/relax?rev=9491&view=rev
Log:
Shifted the valid types private function variable into a module variable.


Modified:
    1.3/generic_fns/pipes.py

Modified: 1.3/generic_fns/pipes.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pipes.py?rev=9491&r1=9490&r2=9491&view=diff
==============================================================================
--- 1.3/generic_fns/pipes.py (original)
+++ 1.3/generic_fns/pipes.py Thu Sep 10 16:53:06 2009
@@ -37,6 +37,10 @@
     from maths_fns.relax_fit import func
 except ImportError:
     C_module_exp_fn = False
+
+
+# List of valid data pipe types.
+VALID_TYPES = ['ct', 'frame order', 'jw', 'hybrid', 'mf', 'N-state', 'noe', 
'relax_fit', 'relax_disp', 'srls']
 
 
 def copy(pipe_from=None, pipe_to=None):
@@ -88,12 +92,9 @@
     @type switch:       bool
     """
 
-    # List of valid data pipe types.
-    valid = ['ct', 'frame order', 'jw', 'hybrid', 'mf', 'N-state', 'noe', 
'relax_fit', 'relax_disp', 'srls']
-
     # Test if pipe_type is valid.
-    if not pipe_type in valid:
-        raise RelaxError("The data pipe type " + repr(pipe_type) + " is 
invalid and must be one of the strings in the list " + repr(valid) + ".")
+    if not pipe_type in VALID_TYPES:
+        raise RelaxError("The data pipe type " + repr(pipe_type) + " is 
invalid and must be one of the strings in the list " + repr(VALID_TYPES) + 
".")
 
     # Test that the C modules have been loaded.
     if pipe_type == 'relax_fit' and not C_module_exp_fn:




Related Messages


Powered by MHonArc, Updated Thu Sep 10 17:00:03 2009