File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 88from .table import Table , FreeTable
99from .heading import Heading
1010from .declare import EXTERNAL_TABLE_ROOT
11- from . import s3
11+ from . import s3 , errors
1212from .utils import safe_write , safe_copy
1313
1414logger = logging .getLogger (__name__ .split ("." )[0 ])
@@ -141,7 +141,12 @@ def _download_buffer(self, external_path):
141141 if self .spec ["protocol" ] == "s3" :
142142 return self .s3 .get (external_path )
143143 if self .spec ["protocol" ] == "file" :
144- return Path (external_path ).read_bytes ()
144+ try :
145+ return Path (external_path ).read_bytes ()
146+ except FileNotFoundError :
147+ raise errors .MissingExternalFile (
148+ f"Missing external file { external_path } "
149+ ) from None
145150 assert False
146151
147152 def _remove_external_file (self , external_path ):
You can’t perform that action at this time.
0 commit comments