Skip to content

Commit 9a6525e

Browse files
committed
thanks, Heath
1 parent bc09ebc commit 9a6525e

File tree

1 file changed

+6
-6
lines changed
  • sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal

1 file changed

+6
-6
lines changed

sdk/keyvault/azure-keyvault-administration/azure/keyvault/administration/_internal/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,14 @@ def parse_folder_url(folder_url):
5959
parsed = urlparse(folder_url)
6060

6161
# the first segment of the path is the container name
62-
container = parsed.path.strip("/").split("/")[0]
62+
stripped_path = parsed.path.strip("/")
63+
container = stripped_path.split("/")[0]
6364

64-
# N.B. this discards any SAS token in the URL.
65-
# This is intentional--client methods require the SAS token as a separate parameter.
66-
container_url = "{}://{}/{}".format(parsed.scheme, parsed.netloc, container)
65+
# the rest of the path is the folder name
66+
folder_name = stripped_path[len(container) + 1 :]
6767

68-
# the folder name is the rest of the path
69-
folder_name = parsed.path[len(container) + 1 :].strip("/")
68+
# this intentionally discards any SAS token in the URL--methods require the SAS token as a separate parameter
69+
container_url = "{}://{}/{}".format(parsed.scheme, parsed.netloc, container)
7070

7171
return BackupLocation(container_url, folder_name)
7272
except: # pylint:disable=broad-except

0 commit comments

Comments
 (0)