mailr3116 - /1.3/data/__init__.py


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

Header


Content

Posted by edward on March 08, 2007 - 07:01:
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()




Related Messages


Powered by MHonArc, Updated Thu Mar 08 07:40:07 2007