Browse Source

Keep py3.X compatibility for urllib

Change-Id: I7bfe6e685a71bde7fc079d95af895e20a8c9c088
Partial-Bug:#1280105
tags/0.13.0^2
Swapnil Kulkarni (coolsvap) 4 years ago
parent
commit
ed0f122915
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      tempest_lib/cmd/check_uuid.py

+ 4
- 3
tempest_lib/cmd/check_uuid.py View File

@@ -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"""

Loading…
Cancel
Save