diff options
author | llg8212 <lilinguo@huawei.com> | 2014-02-24 09:32:52 +0800 |
---|---|---|
committer | llg8212 <lilinguo@huawei.com> | 2014-03-18 10:27:55 +0800 |
commit | 9d3d26d903d269a3bbaabde4ddcc411c28fe3f01 (patch) | |
tree | c89e7c491f6c1df5a517ad659f0a84008b4a0e2f /heatclient/v1/events.py | |
parent | 7e265ec757f26bce5038bdcc7fa81abd823e328f (diff) | |
download | python-heatclient-9d3d26d903d269a3bbaabde4ddcc411c28fe3f01.tar.gz |
Remove dependent module py3kcompat
Module py3kcompat was removed from oslo-incubator, we can use
six directly.
* Sync commit of removing py3kcompat from oslo
* use six replace usage of py3kcompat
Change-Id: If0f9397588b2180fe198e804cbbb5b5c8420fe76
Closes-Bug: #1280033
Diffstat (limited to 'heatclient/v1/events.py')
-rw-r--r-- | heatclient/v1/events.py | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/heatclient/v1/events.py b/heatclient/v1/events.py index cb24664..e4cbcfd 100644 --- a/heatclient/v1/events.py +++ b/heatclient/v1/events.py @@ -13,8 +13,9 @@ # License for the specific language governing permissions and limitations # under the License. +from six.moves.urllib import parse + from heatclient.openstack.common.apiclient import base -from heatclient.openstack.common.py3kcompat import urlutils from heatclient.openstack.common import strutils from heatclient.v1 import stacks @@ -48,10 +49,9 @@ class EventManager(stacks.StackChildManager): url = '/stacks/%s/events' % stack_id else: stack_id = self._resolve_stack_id(stack_id) - # Use urlutils for python2/python3 compatibility url = '/stacks/%s/resources/%s/events' % ( - urlutils.quote(stack_id, ''), - urlutils.quote(strutils.safe_encode(resource_name), '')) + parse.quote(stack_id, ''), + parse.quote(strutils.safe_encode(resource_name), '')) return self._list(url, "events") def get(self, stack_id, resource_name, event_id): @@ -62,10 +62,9 @@ class EventManager(stacks.StackChildManager): :param event_id: ID of event to get the details for """ stack_id = self._resolve_stack_id(stack_id) - # Use urlutils for python2/python3 compatibility url_str = '/stacks/%s/resources/%s/events/%s' % ( - urlutils.quote(stack_id, ''), - urlutils.quote(strutils.safe_encode(resource_name), ''), - urlutils.quote(event_id, '')) + parse.quote(stack_id, ''), + parse.quote(strutils.safe_encode(resource_name), ''), + parse.quote(event_id, '')) resp, body = self.client.json_request('GET', url_str) return Event(self, body['event']) |