summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSwapnil Kulkarni (coolsvap) <me@coolsvap.net>2015-12-24 12:20:42 +0530
committerSwapnil Kulkarni (coolsvap) <me@coolsvap.net>2015-12-24 12:20:42 +0530
commited0f122915890f1ecbc69a2a2942877138567b3c (patch)
tree8d5592239b29c7b626665dba91470f2da852c413
parent963f4943d69778dd8f1d5035e273652e3f0166fb (diff)
downloadtempest-lib-ed0f122915890f1ecbc69a2a2942877138567b3c.tar.gz
Keep py3.X compatibility for urllib
Change-Id: I7bfe6e685a71bde7fc079d95af895e20a8c9c088 Partial-Bug:#1280105
-rwxr-xr-xtempest_lib/cmd/check_uuid.py7
1 files 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"""