Author: bugman Date: Mon Jun 4 16:27:00 2012 New Revision: 16635 URL: http://svn.gna.org/viewcvs/relax?rev=16635&view=rev Log: The pipe.delete user function is now cleaning up the data pipe bundles as needed. The deleted data pipe name is removed from any bundle it is in, and empty bundles are eliminated. Modified: branches/uf_redesign/generic_fns/pipes.py Modified: branches/uf_redesign/generic_fns/pipes.py URL: http://svn.gna.org/viewcvs/relax/branches/uf_redesign/generic_fns/pipes.py?rev=16635&r1=16634&r2=16635&view=diff ============================================================================== --- branches/uf_redesign/generic_fns/pipes.py (original) +++ branches/uf_redesign/generic_fns/pipes.py Mon Jun 4 16:27:00 2012 @@ -213,6 +213,16 @@ # Loop over the pipes. for pipe in pipes: + # Clean up the pipe bundle, if needed. + bundle = get_bundle(pipe) + if bundle: + # Remove the pipe from the bundle, if needed. + ds.pipe_bundles[bundle].remove(pipe) + + # Clean up the bundle. + if ds.pipe_bundles[bundle] == []: + ds.pipe_bundles.pop(bundle) + # Delete the data pipe. del ds[pipe]