Skip to content

Commit

Permalink
fix pylint and update changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
xiafu-msft committed Sep 8, 2020
1 parent 807b69b commit 0e586b0
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions sdk/storage/azure-storage-blob-changefeed/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 12.0.0b2 (2020-9-9)
**Breaking changes**
- Change the `continuation_token` from a dict to a str.
- `start_time`/`end_time` and `continuation_token` are mutually exclusive now.

## 12.0.0b1 (2020-07-07)
- Initial Release. Please see the README for information on the new design.
- Support for ChangeFeedClient: get change feed events by page, get all change feed events, get events in a time range
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,17 @@ def __init__(
extract_data=self._extract_data_cb,
continuation_token=continuation_token or ""
)
continuation_token = json.loads(continuation_token) if continuation_token else None
dict_continuation_token = json.loads(continuation_token) if continuation_token else None # type: dict

if continuation_token and (container_client.primary_hostname != continuation_token["UrlHost"]):
if dict_continuation_token and (container_client.primary_hostname != dict_continuation_token["UrlHost"]): # pylint: disable=unsubscriptable-object
raise ValueError("The token is not for the current storage account.")
if continuation_token and (continuation_token["CursorVersion"] != 1):
if dict_continuation_token and (dict_continuation_token["CursorVersion"] != 1): # pylint: disable=unsubscriptable-object
raise ValueError("The CursorVersion is not supported by the current SDK.")
self.results_per_page = results_per_page or 5000
self.current_page = None
self._change_feed = ChangeFeed(container_client, self.results_per_page, start_time=start_time,
end_time=end_time,
cf_cursor=continuation_token)
cf_cursor=dict_continuation_token)

def _get_next_cf(self, continuation_token): # pylint:disable=unused-argument
try:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
# license information.
# --------------------------------------------------------------------------

VERSION = "12.0.0b1"
VERSION = "12.0.0b2"

0 comments on commit 0e586b0

Please sign in to comment.