File tree Expand file tree Collapse file tree 4 files changed +7
-7
lines changed
Expand file tree Collapse file tree 4 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1319,7 +1319,7 @@ def __next__(self) -> np.ndarray[Any, Any]:
13191319 except ValueError :
13201320 raise BentoError (
13211321 "DBN file is truncated or contains an incomplete record" ,
1322- )
1322+ ) from None
13231323
13241324
13251325class DataFrameIterator :
Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ def _download_file(
376376 for chunk in response .iter_content (chunk_size = None ):
377377 f .write (chunk )
378378 except Exception as exc :
379- raise BentoError (f"Error downloading file: { exc } " )
379+ raise BentoError (f"Error downloading file: { exc } " ) from None
380380 logger .debug ("Download of %s completed" , output_path .name )
381381
382382 async def download_async (
@@ -521,7 +521,7 @@ async def _download_file_async(
521521 data : bytes = chunk [0 ]
522522 f .write (data )
523523 except Exception as exc :
524- raise BentoError (f"Error downloading file: { exc } " )
524+ raise BentoError (f"Error downloading file: { exc } " ) from None
525525 logger .debug ("Download of %s completed" , output_path .name )
526526
527527 def _get_file_download_headers_and_mode (
Original file line number Diff line number Diff line change @@ -137,7 +137,7 @@ def _stream(
137137 for chunk in response .iter_content (chunk_size = None ):
138138 writer .write (chunk )
139139 except Exception as exc :
140- raise BentoError (f"Error streaming response: { exc } " )
140+ raise BentoError (f"Error streaming response: { exc } " ) from None
141141
142142 if path is None :
143143 writer .seek (0 )
@@ -177,7 +177,7 @@ async def _stream_async(
177177 async for chunk in response .content .iter_chunks ():
178178 writer .write (chunk [0 ])
179179 except Exception as exc :
180- raise BentoError (f"Error streaming response: { exc } " )
180+ raise BentoError (f"Error streaming response: { exc } " ) from None
181181
182182 if path is None :
183183 writer .seek (0 )
Original file line number Diff line number Diff line change @@ -414,12 +414,12 @@ async def wait_for_close(self) -> None:
414414 try :
415415 self ._protocol .authenticated .result ()
416416 except Exception as exc :
417- raise BentoError (exc )
417+ raise BentoError (exc ) from None
418418
419419 try :
420420 self ._protocol .disconnected .result ()
421421 except Exception as exc :
422- raise BentoError (exc )
422+ raise BentoError (exc ) from None
423423
424424 self ._protocol = self ._transport = None
425425
You can’t perform that action at this time.
0 commit comments