Author: bugman Date: Thu Mar 8 07:01:21 2007 New Revision: 3116 URL: http://svn.gna.org/viewcvs/relax?rev=3116&view=rev Log: The 'add()' method now throws a RelaxRunError if the data pipe already exists. Modified: 1.3/data/__init__.py Modified: 1.3/data/__init__.py URL: http://svn.gna.org/viewcvs/relax/1.3/data/__init__.py?rev=3116&r1=3115&r2=3116&view=diff ============================================================================== --- 1.3/data/__init__.py (original) +++ 1.3/data/__init__.py Thu Mar 8 07:01:21 2007 @@ -26,6 +26,7 @@ # relax module imports. from pipe_container import PipeContainer +from relax_errors import RelaxRunError __all__ = [ 'data_classes', @@ -131,4 +132,9 @@ @type pipe: str """ + # Test if the pipe already exists. + if pipe in self.keys(): + raise RelaxRunError, pipe + + # Create a new container. self[pipe] = PipeContainer()