mailr7478 - /branches/pipe_refs/specific_fns/model_free/main.py


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

Header


Content

Posted by edward on October 01, 2008 - 14:05:
Author: bugman
Date: Wed Oct  1 14:05:12 2008
New Revision: 7478

URL: http://svn.gna.org/viewcvs/relax?rev=7478&view=rev
Log:
Clean up of duplicate_data().


Modified:
    branches/pipe_refs/specific_fns/model_free/main.py

Modified: branches/pipe_refs/specific_fns/model_free/main.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/pipe_refs/specific_fns/model_free/main.py?rev=7478&r1=7477&r2=7478&view=diff
==============================================================================
--- branches/pipe_refs/specific_fns/model_free/main.py (original)
+++ branches/pipe_refs/specific_fns/model_free/main.py Wed Oct  1 14:05:12 
2008
@@ -971,11 +971,9 @@
         if model_index == None:
             raise RelaxError, "The model_index argument cannot be None."
 
-        # First create the pipe_to data pipe, if it doesn't exist (restoring 
the current pipe at the end).
-        current_pipe = pipes.cdp_name()
-        if not ds.has_key(pipe_to):
-            pipes.create(pipe_to, pipe_type='mf')
-        pipes.switch(current_pipe)
+        # First create the pipe_to data pipe, if it doesn't exist, but don't 
switch to it.
+        if not pipes.has_pipe(pipe_to):
+            pipes.create(pipe_to, pipe_type='mf', switch=False)
 
         # Get the data pipes.
         dp_from = pipes.get_pipe(pipe_from)




Related Messages


Powered by MHonArc, Updated Wed Oct 01 14:20:01 2008