File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff 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 ))
You can’t perform that action at this time.
0 commit comments