Skip to content

Commit 07f9ce4

Browse files
authored
Release 1.67.4 (#179)
1 parent c7a02dc commit 07f9ce4

File tree

4 files changed

+22
-19
lines changed

4 files changed

+22
-19
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "py-pure-client"
3-
version = "1.67.3"
3+
version = "1.67.4"
44
description = "Pure Storage Python clients for FlashArray, FlashBlade, and Pure1 APIs"
55
authors = [
66
{ name = "Pure Storage", email = "support@purestorage.com" }

pypureclient/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
__name__ = 'py-pure-client'
2-
__version__ = '1.67.3'
2+
__version__ = '1.67.4'
33
__default_user_agent__ = 'pure/{}/{}'.format(__name__, __version__)

pypureclient/responses.py

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -327,23 +327,26 @@ def _refresh_data(self):
327327
if self._x_request_id is not None:
328328
self._kwargs[Parameters.x_request_id] = self._x_request_id
329329
# Call the API again and update internal state
330+
body = None
330331
try:
331332
response = self._api_endpoint(**self._kwargs)
332-
body, status, headers = response
333-
if body is None:
334-
raise StopIteration
335-
continuation_token = getattr(body, "continuation_token", None)
336-
total_item_count = getattr(body, "total_item_count", None)
337-
# *-get-response models have "continuation_token" attribute. Other models don't have them.
338-
if continuation_token is not None:
339-
self._more_items_remaining = True
340-
else:
341-
# Only GET responses are paged.
342-
self._more_items_remaining = False
343-
344-
self._continuation_token = continuation_token
345-
self._total_item_count = total_item_count
346-
self._items = body.items
333+
body = response.data
347334
except Exception as e:
348335
# Generic errors for pagination
349336
raise PureError('Failed to collect more items: {}'.format(e))
337+
338+
if body is None:
339+
raise StopIteration
340+
341+
continuation_token = getattr(body, "continuation_token", None)
342+
total_item_count = getattr(body, "total_item_count", None)
343+
# *-get-response models have "continuation_token" attribute. Other models don't have them.
344+
if continuation_token is not None:
345+
self._more_items_remaining = True
346+
else:
347+
# Only GET responses are paged.
348+
self._more_items_remaining = False
349+
350+
self._continuation_token = continuation_token
351+
self._total_item_count = total_item_count
352+
self._items = body.items

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
from setuptools import setup, find_packages # noqa: H301
1010

1111
NAME = 'py-pure-client'
12-
VERSION = '1.67.3'
12+
VERSION = '1.67.4'
1313

1414
REQUIRES = [
1515
'certifi >= 2024.07.04',
@@ -34,7 +34,7 @@
3434
author='Pure Storage',
3535
author_email='openconnect@purestorage.com',
3636
url='https://github.com/PureStorage-OpenConnect/py-pure-client',
37-
download_url='https://github.com/PureStorage-OpenConnect/py-pure-client/archive/1.67.3.tar.gz',
37+
download_url='https://github.com/PureStorage-OpenConnect/py-pure-client/archive/1.67.4.tar.gz',
3838
keywords=['Swagger', 'Pure Storage', 'Python', 'clients', 'REST', 'API', 'FlashArray', 'FlashBlade', 'Pure1'],
3939
license='BSD 2-Clause',
4040
license_files = ('LICENSE.txt',),

0 commit comments

Comments
 (0)