Skip to content

Commit 1c444a7

Browse files
authored
Don't hide error in WorkspaceApi.import_workspace_dir (#573)
1 parent c62d861 commit 1c444a7

File tree

1 file changed

+1
-6
lines changed
  • databricks_cli/workspace

1 file changed

+1
-6
lines changed

databricks_cli/workspace/api.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from base64 import b64encode, b64decode
2626

2727
import click
28-
from requests.exceptions import HTTPError
2928

3029
from databricks_cli.dbfs.exceptions import LocalFileExistsException
3130
from databricks_cli.sdk import WorkspaceService
@@ -140,11 +139,7 @@ def import_workspace_dir(self, source_path, target_path, overwrite, exclude_hidd
140139
if exclude_hidden_files:
141140
# for now, just exclude hidden files or directories based on starting '.'
142141
filenames = [f for f in filenames if not f.startswith('.')]
143-
try:
144-
self.mkdirs(target_path, headers=headers)
145-
except HTTPError as e:
146-
click.echo(e.response.json())
147-
return
142+
self.mkdirs(target_path, headers=headers)
148143
for filename in filenames:
149144
cur_src = os.path.join(source_path, filename)
150145
# don't use os.path.join here since it will set \ on Windows

0 commit comments

Comments
 (0)