Author: bugman
Date: Sat Oct 18 10:20:36 2014
New Revision: 26311
URL: http://svn.gna.org/viewcvs/relax?rev=26311&view=rev
Log:
Modified the pipe_control.pipes.get_bundle() function to operate when no pipe
is supplied.
In this case, the pipe bundle that the current data pipe belongs to will be
returned.
Modified:
trunk/pipe_control/pipes.py
Modified: trunk/pipe_control/pipes.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/pipe_control/pipes.py?rev=26311&r1=26310&r2=26311&view=diff
==============================================================================
--- trunk/pipe_control/pipes.py (original)
+++ trunk/pipe_control/pipes.py Sat Oct 18 10:20:36 2014
@@ -349,14 +349,19 @@
def get_bundle(pipe=None):
"""Return the name of the bundle that the given pipe belongs to.
- @keyword pipe: The name of the data pipe to find the bundle of.
- @type pipe: str
+ @keyword pipe: The name of the data pipe to find the bundle of,
defaulting to the current pipe.
+ @type pipe: str or None
@return: The name of the bundle that the pipe is located in.
@rtype: str or None
"""
+ # The name of the data pipe.
+ if pipe == None:
+ pipe = cdp_name()
+
# Check that the data pipe exists.
- check_pipe(pipe)
+ else:
+ check_pipe(pipe)
# Find and return the bundle.
for key in ds.pipe_bundles.keys():
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits