Skip to content

Commit 4815a9c

Browse files
committed
no need to encode str to utf-8 as it will become bytes instead
1 parent 1d65ac3 commit 4815a9c

File tree

1 file changed

+1
-4
lines changed
  • src/azure-cli/azure/cli/command_modules/storage

1 file changed

+1
-4
lines changed

src/azure-cli/azure/cli/command_modules/storage/util.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,7 @@ def collect_blob_objects(blob_service, container, pattern=None):
4444
else:
4545
blobs = container_client.list_blobs()
4646
for blob in blobs:
47-
try:
48-
blob_name = blob.name.encode('utf-8') if isinstance(blob.name, str) else blob.name
49-
except NameError:
50-
blob_name = blob.name
47+
blob_name = blob.name
5148

5249
if not pattern or _match_path(blob_name, pattern):
5350
yield blob_name, blob

0 commit comments

Comments
 (0)