summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/vesagent/vespublish.py
diff options
context:
space:
mode:
Diffstat (limited to 'windriver/titanium_cloud/vesagent/vespublish.py')
-rw-r--r--windriver/titanium_cloud/vesagent/vespublish.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/windriver/titanium_cloud/vesagent/vespublish.py b/windriver/titanium_cloud/vesagent/vespublish.py
index b67a64ee..33b971b0 100644
--- a/windriver/titanium_cloud/vesagent/vespublish.py
+++ b/windriver/titanium_cloud/vesagent/vespublish.py
@@ -21,14 +21,15 @@ import urllib2
logger = logging.getLogger(__name__)
+
def publishAnyEventToVES(ves_subscription, events):
if not events or len(events) == 0:
return
logger.info("Start to send single event to VES collector.")
endpoint = ves_subscription.get("endpoint", None)
- username = ves_subscription.get("username", None)
- password = ves_subscription.get("password", None)
+ # username = ves_subscription.get("username", None)
+ # password = ves_subscription.get("password", None)
if endpoint:
try:
@@ -44,9 +45,9 @@ def publishAnyEventToVES(ves_subscription, events):
time.sleep(1)
response = urllib2.urlopen(request)
logger.info("VES response is: %s" % response.read())
- except urllib2.URLError, e:
+ except urllib2.URLError as e:
logger.critical("Failed to publish to %s: %s" % (endpoint, e.reason))
except Exception as e:
logger.error("exception:%s" % str(e))
else:
- logger.info("Missing VES info.") \ No newline at end of file
+ logger.info("Missing VES info.")