From 21774ae8cb5b123b7714ac47bb30c697dc9ceb8c Mon Sep 17 00:00:00 2001 From: Gordon Chung Date: Wed, 21 May 2014 12:38:59 -0400 Subject: [PATCH] switch SplitResult to use six SplitResult included in six 1.6, switch to use six. Change-Id: I5a61c0ab74899fcbfc2405488bfce5bd1de96dd0 --- ceilometer/alarm/notifier/trust.py | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/ceilometer/alarm/notifier/trust.py b/ceilometer/alarm/notifier/trust.py index b3190b1b8..bd19faa8f 100644 --- a/ceilometer/alarm/notifier/trust.py +++ b/ceilometer/alarm/notifier/trust.py @@ -15,15 +15,9 @@ # under the License. """Rest alarm notifier with trusted authentication.""" -try: - import urllib.parse - SplitResult = urllib.parse.SplitResult -except ImportError: - import urlparse - SplitResult = urlparse.SplitResult - from keystoneclient.v3 import client as keystone_client from oslo.config import cfg +from six.moves.urllib import parse from ceilometer.alarm import notifier @@ -58,8 +52,8 @@ class TrustRestAlarmNotifier(notifier.rest.RestAlarmNotifier): # Remove the trust prefix scheme = action.scheme[6:] - action = SplitResult(scheme, netloc, action.path, action.query, - action.fragment) + action = parse.SplitResult(scheme, netloc, action.path, action.query, + action.fragment) headers = {'X-Auth-Token': client.auth_token} notifier.rest.RestAlarmNotifier.notify(