summaryrefslogtreecommitdiff
path: root/swiftclient/utils.py
diff options
context:
space:
mode:
Diffstat (limited to 'swiftclient/utils.py')
-rw-r--r--swiftclient/utils.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/swiftclient/utils.py b/swiftclient/utils.py
index 87a4390..2b208b9 100644
--- a/swiftclient/utils.py
+++ b/swiftclient/utils.py
@@ -395,3 +395,11 @@ def n_at_a_time(seq, n):
def n_groups(seq, n):
items_per_group = ((len(seq) - 1) // n) + 1
return n_at_a_time(seq, items_per_group)
+
+
+def normalize_manifest_path(path):
+ if six.PY2 and isinstance(path, six.text_type):
+ path = path.encode('utf-8')
+ if path.startswith('/'):
+ return path[1:]
+ return path