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 8
8
from .table import Table , FreeTable
9
9
from .heading import Heading
10
10
from .declare import EXTERNAL_TABLE_ROOT
11
- from . import s3
11
+ from . import s3 , errors
12
12
from .utils import safe_write , safe_copy
13
13
14
14
logger = logging .getLogger (__name__ .split ("." )[0 ])
@@ -141,7 +141,12 @@ def _download_buffer(self, external_path):
141
141
if self .spec ["protocol" ] == "s3" :
142
142
return self .s3 .get (external_path )
143
143
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
145
150
assert False
146
151
147
152
def _remove_external_file (self , external_path ):
You can’t perform that action at this time.
0 commit comments