switch SplitResult to use six

SplitResult included in six 1.6, switch to use six.

Change-Id: I5a61c0ab74899fcbfc2405488bfce5bd1de96dd0
This commit is contained in:
Gordon Chung 2014-05-21 12:38:59 -04:00
parent e12de4dba6
commit 21774ae8cb

View File

@ -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,7 +52,7 @@ class TrustRestAlarmNotifier(notifier.rest.RestAlarmNotifier):
# Remove the trust prefix
scheme = action.scheme[6:]
action = SplitResult(scheme, netloc, action.path, action.query,
action = parse.SplitResult(scheme, netloc, action.path, action.query,
action.fragment)
headers = {'X-Auth-Token': client.auth_token}