Skip to content

Commit 04c8895

Browse files
committed
removing monopolize comment from get_exported_bundle_archive_stream
1 parent f09bef8 commit 04c8895

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

dataikuapi/dss/project.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1055,13 +1055,18 @@ def get_exported_bundle_archive_stream(self, bundle_id):
10551055
10561056
.. warning::
10571057
1058-
this stream will monopolize the DSSClient until closed, so the stream must be closed after use or used within a ``with`` statement. For example:
1058+
The stream must be closed after use. Use a ``with`` statement to handle closing the stream at the end of the block by default. For example:
10591059
10601060
.. code-block:: python
10611061
10621062
with project.get_exported_bundle_archive_stream('v1') as fp:
10631063
# use fp
10641064
1065+
# or explicitly close the stream after use
1066+
fp = project.get_exported_bundle_archive_stream('v1')
1067+
# use fp, then close
1068+
fp.close()
1069+
10651070
"""
10661071
return self.client._perform_raw("GET",
10671072
"/projects/%s/bundles/exported/%s/archive" % (self.project_key, bundle_id))

0 commit comments

Comments
 (0)