summaryrefslogtreecommitdiff
path: root/swiftclient
diff options
context:
space:
mode:
authorStephen Finucane <stephenfin@redhat.com>2022-03-21 18:17:41 +0000
committerStephen Finucane <stephenfin@redhat.com>2022-03-21 18:32:30 +0000
commit20d837a27665632cc5b164b96671290b04c48a58 (patch)
tree39039f9c5436f717cbc4e10affbe1c3df1f17095 /swiftclient
parent61ce5ac8244206c5e469e24459e365a5b0767dd5 (diff)
downloadpython-swiftclient-20d837a27665632cc5b164b96671290b04c48a58.tar.gz
Remove unnecessary unicode prefixes
All strings are unicode by default in Python 3. No need to mark them as such. Signed-off-by: Stephen Finucane <stephenfin@redhat.com> Change-Id: I68fb60ef271abfddebcc9d2137424f5db2a17e92
Diffstat (limited to 'swiftclient')
-rw-r--r--swiftclient/utils.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index e99ed37..860d8bf 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -172,7 +172,7 @@ def generate_temp_url(path, seconds, key, method, absolute=False,
)
hmac_parts.insert(0, "ip=%s" % ip_range)
- hmac_body = u'\n'.join(hmac_parts)
+ hmac_body = '\n'.join(hmac_parts)
# Encode to UTF-8 for py3 compatibility
if not isinstance(key, bytes):
@@ -183,14 +183,14 @@ def generate_temp_url(path, seconds, key, method, absolute=False,
expiration = time.strftime(
EXPIRES_ISO8601_FORMAT, time.gmtime(expiration))
- temp_url = u'{path}?temp_url_sig={sig}&temp_url_expires={exp}'.format(
+ temp_url = '{path}?temp_url_sig={sig}&temp_url_expires={exp}'.format(
path=path_for_body, sig=sig, exp=expiration)
if ip_range:
- temp_url += u'&temp_url_ip_range={}'.format(ip_range)
+ temp_url += '&temp_url_ip_range={}'.format(ip_range)
if prefix:
- temp_url += u'&temp_url_prefix={}'.format(parts[4])
+ temp_url += '&temp_url_prefix={}'.format(parts[4])
# Have return type match path from caller
if isinstance(path, bytes):
return temp_url.encode('utf-8')