summaryrefslogtreecommitdiffstats
path: root/windriver/titanium_cloud/vesagent/vespublish.py
diff options
context:
space:
mode:
authorXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:31:54 +0000
committerXiaohua Zhang <xiaohua.zhang@windriver.com>2018-11-27 10:31:54 +0000
commitf8c71ac2d1a764c953f5c8cf513aa8d3f9810578 (patch)
tree1fdd124fc76e4d35c2880dee0e9d52e9b0826487 /windriver/titanium_cloud/vesagent/vespublish.py
parent78ead3c00e16cf9e4fd24535a925d3766c6f6aa8 (diff)
Fix pep8 errors in windriver plugin
Fix errors in vesagent Change-Id: I9cb0afda7a17a08246fcee8439e1ef2775609948 Issue-ID: MULTICLOUD-420 Signed-off-by: Xiaohua Zhang <xiaohua.zhang@windriver.com>
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.")