tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ajbor...@apache.org
Subject svn commit: r512793 - in /incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter: AlertCheckerImpl.py AlertConfigImpl.py
Date Wed, 28 Feb 2007 15:08:28 GMT
Author: ajborley
Date: Wed Feb 28 07:08:27 2007
New Revision: 512793

URL: http://svn.apache.org/viewvc?view=rev&rev=512793
Log:
Fixes to AlertAggregator sample to get it working on Linux

Modified:
    incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertCheckerImpl.py
    incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertConfigImpl.py

Modified: incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertCheckerImpl.py
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertCheckerImpl.py?view=diff&rev=512793&r1=512792&r2=512793
==============================================================================
--- incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertCheckerImpl.py (original)
+++ incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertCheckerImpl.py Wed
Feb 28 07:08:27 2007
@@ -106,3 +106,11 @@
 def getAlertSources ():
     # Get the config for all the sources
     return alertConfigService.getAlertConfig()
+
+# # Testing
+# import AlertConfigImpl as alertConfigService
+# import RSSCheckerImpl as rssCheckerService
+# import POPCheckerImpl as popCheckerService
+#
+# print xml.etree.ElementTree.tostring(getAlertSources())
+# print xml.etree.ElementTree.tostring(getAllNewAlerts())

Modified: incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertConfigImpl.py
URL: http://svn.apache.org/viewvc/incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertConfigImpl.py?view=diff&rev=512793&r1=512792&r2=512793
==============================================================================
--- incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertConfigImpl.py (original)
+++ incubator/tuscany/cpp/sca/samples/AlertAggregator/sample.alerter/AlertConfigImpl.py Wed
Feb 28 07:08:27 2007
@@ -16,16 +16,16 @@
 # under the License.
 #
 
-import xml.etree.ElementTree, os.path, datetime
+import xml.etree.ElementTree, os.path, os
 
 def getAlertConfig ():
 
     # Set up some default config data
     configData = "<config xmlns=\"http://tuscany.apache.org/samples/alerter\">\n</config>"
 
-    if os.path.isfile("config.xml"):
+    if os.path.isfile(os.environ['TUSCANY_SCACPP_ROOT']+"/config.xml"):
         # Retrieve the configuration from a file
-        f = open("config.xml")
+        f = open(os.environ['TUSCANY_SCACPP_ROOT']+"/config.xml")
         try:
             configData = f.read()
         finally:
@@ -91,7 +91,7 @@
     configData = xml.etree.ElementTree.tostring(configElem)
 
     # Save the configuration to a file
-    f = open("config.xml", "w")
+    f = open(os.environ['TUSCANY_SCACPP_ROOT']+"/config.xml", "w")
 
     if not f:
         print "Failed to open config file for writing"



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message