Skip to content

Commit

Permalink
reset commit
Browse files Browse the repository at this point in the history
  • Loading branch information
tasherif-msft committed Sep 1, 2020
1 parent f800b56 commit 744b14e
Show file tree
Hide file tree
Showing 6 changed files with 217 additions and 166 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

import six
from azure.core.tracing.decorator import distributed_trace
from azure.core.exceptions import ResourceNotFoundError

from ._shared import encode_base64
from ._shared.base_client import StorageAccountHostsMixin, parse_connection_str, parse_query
Expand Down Expand Up @@ -934,14 +933,11 @@ def exists(self, **kwargs):
:returns: boolean
"""
try:
blob_props = self._client.blob.get_properties(
self._client.blob.get_properties(
snapshot=self.snapshot,
cls=deserialize_blob_properties,
**kwargs)
if blob_props and blob_props.is_current_version or blob_props and self.snapshot:
return True
return False
except ResourceNotFoundError:
return True
except StorageErrorException:
return False

@distributed_trace
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -476,14 +476,11 @@ async def exists(self, **kwargs):
:returns: boolean
"""
try:
blob_props = await self._client.blob.get_properties(
**kwargs,
await self._client.blob.get_properties(
snapshot=self.snapshot,
cls=deserialize_blob_properties)
if blob_props and blob_props.is_current_version or blob_props and self.snapshot:
return True
return False
except ResourceNotFoundError:
**kwargs)
return True
except StorageErrorException:
return False

@distributed_trace_async
Expand Down
Loading

0 comments on commit 744b14e

Please sign in to comment.