It was removed urllib, urllib2 & urlparse modules

Those modules have been combined in python 3. Therefore,
implementing the six module helps to have support to both versions.

Change-Id: I164a0f19790ff066d16d0cf4f0daa6f1097c848e
Closes-Bug: #1267181
This commit is contained in:
Victor Morales
2014-01-15 13:34:09 -06:00
parent e4d1961c92
commit 29674c3f48
6 changed files with 25 additions and 23 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
# under the License.
import six
import urllib
from six.moves.urllib import parse
import warlock
@@ -64,10 +64,10 @@ class Controller(object):
if isinstance(value, six.string_types):
filters[param] = strutils.safe_encode(value)
url = '/v2/images?%s' % urllib.urlencode(filters)
url = '/v2/images?%s' % parse.urlencode(filters)
for param in tags_url_params:
url = '%s&%s' % (url, urllib.urlencode(param))
url = '%s&%s' % (url, parse.urlencode(param))
for image in paginate(url):
#NOTE(bcwaldon): remove 'self' for now until we have an elegant