Closed ClemPi closed 7 years ago
Hi ClemPi, For the urllib refactor, wouldn't it be better to do something like this:
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
instead of explicitly checking the python version?
I did this because the method is not the same and we have to explicitly check the version when calling urlencode
: https://github.com/valerytschopp/python-radosgw-admin/pull/4/commits/566adf64a0bae09c967109703153a11a2c13dc38#diff-fe3c0a5df953368eb825f1815aa2b8c9R99.
But we can do the other way if you prefer
Yes, I understand. Sorry my example was bad, I really would prefer:
try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
...
urlencode(query_params)
...
Yes, better alternative. Just updated the PR
Code bytes http response. Handle urllib refactor.
Address #2