From dcee7028019b89703fb5e25dd59fdb6fd882129a Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Thu, 23 Jun 2016 13:40:42 +0200 Subject: [PATCH] Python 3: fix urllib import Replace urllib.quote import with six.moves.urllib.parse.quote, so the code works on Python 2 and Python 3. Change-Id: I17e9cd9668661b6a67f33db83e0cbfc8ea6e3ca6 --- swift/common/middleware/copy.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swift/common/middleware/copy.py b/swift/common/middleware/copy.py index b446b1b7b3..6f7cd4d17d 100644 --- a/swift/common/middleware/copy.py +++ b/swift/common/middleware/copy.py @@ -132,9 +132,8 @@ backwards compatibility. At first chance, set ``object_post_as_copy`` to """ import os -from urllib import quote from ConfigParser import ConfigParser, NoSectionError, NoOptionError -from six.moves.urllib.parse import unquote +from six.moves.urllib.parse import quote, unquote from swift.common import utils from swift.common.utils import get_logger, \