[rhmessaging-commits] rhmessaging commits: r2573 - mgmt/trunk/cumin/python/cumin.

rhmessaging-commits at lists.jboss.org rhmessaging-commits at lists.jboss.org
Thu Oct 2 07:57:19 EDT 2008


Author: justi9
Date: 2008-10-02 07:57:19 -0400 (Thu, 02 Oct 2008)
New Revision: 2573

Modified:
   mgmt/trunk/cumin/python/cumin/__init__.py
   mgmt/trunk/cumin/python/cumin/tools.py
Log:
Pass CuminConfig directly to Cumin

Modified: mgmt/trunk/cumin/python/cumin/__init__.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/__init__.py	2008-10-02 10:43:31 UTC (rev 2572)
+++ mgmt/trunk/cumin/python/cumin/__init__.py	2008-10-02 11:57:19 UTC (rev 2573)
@@ -24,13 +24,20 @@
 log = logging.getLogger("cumin")
 
 class Cumin(Application):
-    def __init__(self, home, data_uri, spec_path):
+    def __init__(self, config):
         super(Cumin, self).__init__()
 
-        self.home = home
+        self.config = config
+
+        if self.config.debug:
+            self.enable_debug()
+
+        #home, data_uri, spec_path):
+
+        self.home = self.config.home
         self.add_resource_dir(os.path.join(self.home, "resources"))
 
-        self.model = CuminModel(self, data_uri, spec_path)
+        self.model = CuminModel(self, self.config.data, self.config.spec)
         self.broker_connect_thread = BrokerConnectThread(self.model)
 
         def closeListener(*args):

Modified: mgmt/trunk/cumin/python/cumin/tools.py
===================================================================
--- mgmt/trunk/cumin/python/cumin/tools.py	2008-10-02 10:43:31 UTC (rev 2572)
+++ mgmt/trunk/cumin/python/cumin/tools.py	2008-10-02 11:57:19 UTC (rev 2573)
@@ -374,7 +374,7 @@
         if self.config.debug:
             self.config.prt()
 
-        app = Cumin(self.config.home, self.config.data, self.config.spec)
+        app = Cumin(self.config)
 
         try:
             app.check()
@@ -439,11 +439,8 @@
         if self.config.debug:
             self.config.prt()
 
-        app = Cumin(self.config.home, self.config.data, self.config.spec)
+        app = Cumin(self.config)
 
-        if self.config.debug:
-            app.enable_debug()
-
         try:
             app.check()
         except Exception, e:
@@ -510,11 +507,8 @@
         if self.config.debug:
             self.config.prt()
 
-        app = Cumin(self.config.home, self.config.data, self.config.spec)
+        app = Cumin(self.config)
 
-        if self.config.debug:
-            app.enable_debug()
-
         try:
             app.check()
         except Exception, e:




More information about the rhmessaging-commits mailing list