From ed0f122915890f1ecbc69a2a2942877138567b3c Mon Sep 17 00:00:00 2001 From: "Swapnil Kulkarni (coolsvap)" Date: Thu, 24 Dec 2015 12:20:42 +0530 Subject: [PATCH] Keep py3.X compatibility for urllib Change-Id: I7bfe6e685a71bde7fc079d95af895e20a8c9c088 Partial-Bug:#1280105 --- tempest_lib/cmd/check_uuid.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tempest_lib/cmd/check_uuid.py b/tempest_lib/cmd/check_uuid.py index 30628cc..3adeecd 100755 --- a/tempest_lib/cmd/check_uuid.py +++ b/tempest_lib/cmd/check_uuid.py @@ -21,9 +21,10 @@ import inspect import os import sys import unittest -import urllib import uuid +import six.moves.urllib.parse as urlparse + DECORATOR_MODULE = 'test' DECORATOR_NAME = 'idempotent_id' DECORATOR_IMPORT = 'tempest.%s' % DECORATOR_MODULE @@ -49,11 +50,11 @@ class SourcePatcher(object): @staticmethod def _quote(s): - return urllib.quote(s) + return urlparse.quote(s) @staticmethod def _unquote(s): - return urllib.unquote(s) + return urlparse.unquote(s) def add_patch(self, filename, patch, line_no): """Add lazy patch"""