mailr14040 - /branches/gui_testing/status.py


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

Header


Content

Posted by edward on August 01, 2011 - 18:30:
Author: bugman
Date: Mon Aug  1 18:30:42 2011
New Revision: 14040

URL: http://svn.gna.org/viewcvs/relax?rev=14040&view=rev
Log:
Fixes for the status container auto-analysis objects.

The auto-analysis objects are now initialised within the class bypassing the 
__setattr__() method
which has been over-written.


Modified:
    branches/gui_testing/status.py

Modified: branches/gui_testing/status.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/status.py?rev=14040&r1=14039&r2=14040&view=diff
==============================================================================
--- branches/gui_testing/status.py (original)
+++ branches/gui_testing/status.py Mon Aug  1 18:30:42 2011
@@ -116,27 +116,33 @@
         """
 
         # Add a status container.
-        self.auto_analysis[name] = Auto_analysis()
-
-        # Store the analysis type.
-        self.auto_analysis[name].type = type
-
-        # The completion flag.
-        self.auto_analysis[name].fin = False
-
-        # The Monte Carlo simulation status, if used.
-        self.auto_analysis[name].mc_number = None
+        self.auto_analysis[name] = Auto_analysis(name, type)
 
 
 
 class Auto_analysis:
     """The auto-analysis status container."""
 
-    def __init__(self):
-        """Initialise the auto-analysis status object."""
+    def __init__(self, name, type):
+        """Initialise the auto-analysis status object.
+
+        @param name:    The unique name of the auto-analysis.  This will act 
as a key.
+        @type name:     str.
+        @param type:    The type of auto-analysis.
+        @type type:     str
+        """
 
         # The status container.
-        self.status = Status()
+        self._status = Status()
+
+        # Store the analysis type.
+        self.__dict__['type'] = type
+
+        # The completion flag.
+        self.__dict__['fin'] = False
+
+        # The Monte Carlo simulation status, if used.
+        self.__dict__['mc_number'] = None
 
 
     def __setattr__(self, name, value):
@@ -152,7 +158,7 @@
         self.__dict__[name] = value
 
         # Then notify the observers.
-        self.status.observers.auto_analyses.notify()
+        self._status.observers.auto_analyses.notify()
 
 
 




Related Messages


Powered by MHonArc, Updated Mon Aug 01 18:40:02 2011