From 7d9dbfd95def372476a5933c71af98025a6ec449 Mon Sep 17 00:00:00 2001 From: xiaozhuangqing Date: Fri, 26 Aug 2016 13:42:16 +0800 Subject: [PATCH] Replace urllib.quote() with six.moves.urllib.parse.quote() Change-Id: Ie05785804a2c01635c66b6e5c89413850d9a747c --- ceilometer/api/controllers/v2/resources.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ceilometer/api/controllers/v2/resources.py b/ceilometer/api/controllers/v2/resources.py index b9918c21fa..fd453c751c 100644 --- a/ceilometer/api/controllers/v2/resources.py +++ b/ceilometer/api/controllers/v2/resources.py @@ -19,7 +19,7 @@ # under the License. import datetime -import urllib +from six.moves import urllib import pecan from pecan import rest @@ -124,7 +124,7 @@ class ResourcesController(rest.RestController): # In case we have special character in resource id, for example, swift # can generate samples with resource id like # 29f809d9-88bb-4c40-b1ba-a77a1fcf8ceb/glance - resource_id = urllib.unquote(resource_id) + resource_id = urllib.parse.unquote(resource_id) authorized_project = rbac.get_limited_to_project(pecan.request.headers) resources = list(pecan.request.storage_conn.get_resources(