File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -120,7 +120,7 @@ def datasets(self, objects: Sequence[DICOMDownloadable]):
120120 )
121121
122122 def download_iterator (self , downloadable : DICOMDownloadable ):
123- """Perform a wado RS request and iterate over the returned datasets
123+ """Perform a wado RS request and iterate over the returned datasets.
124124
125125 Returns
126126 -------
@@ -147,7 +147,7 @@ def parse(self, response) -> Iterator[Dataset]:
147147 Raises
148148 ------
149149 DICOMTrolleyError
150- If response is not as expected or if parsing fails
150+ If response is not as expected or if parsing fails.
151151
152152 Returns
153153 -------
@@ -172,6 +172,10 @@ def parse(self, response) -> Iterator[Dataset]:
172172 f" Response content (first 300 elements) was"
173173 f" { str (response .content [:300 ])} "
174174 ) from e
175+ except OSError as e : # pydicom might validly raise this on bad DICOM
176+ raise DICOMTrolleyError (
177+ "Error parsing response as DICOM"
178+ ) from e
175179
176180 @staticmethod
177181 def check_for_response_errors (response ):
You can’t perform that action at this time.
0 commit comments