Skip to content

Commit

Permalink
Merge pull request #1443 from girder/pyupdate-dicom-adapter
Browse files Browse the repository at this point in the history
Update a few lines based on pyupdate
  • Loading branch information
manthey authored Jan 23, 2024
2 parents e7fc510 + 52e21ef commit c7e130d
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,14 +155,13 @@ def downloadFile(self, file, offset=0, headers=True, endByte=None,
def stream():
# Perform the request
response = client._http_get(url, headers=headers, stream=True)
for chunk in self._stream_retrieve_instance_response(response):
yield chunk
yield from self._stream_retrieve_instance_response(response)

return stream

def _extract_media_type_and_boundary(self, response):
content_type = response.headers['content-type']
media_type, *ct_info = [ct.strip() for ct in content_type.split(';')]
media_type, *ct_info = (ct.strip() for ct in content_type.split(';'))
boundary = None
for item in ct_info:
attr, _, value = item.partition('=')
Expand Down

0 comments on commit c7e130d

Please sign in to comment.