Skip to content

Commit 7e2bfb3

Browse files
committed
Handle Empty Repos Scenario
Handles the scenario where source workspace doesn't have any Repo usage.
1 parent 7e98793 commit 7e2bfb3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dbclient/WorkspaceClient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,7 +447,7 @@ def log_all_workspace_items(self, ws_path, workspace_log_writer, libs_log_writer
447447
num_nbs = 0
448448
if self.is_verbose():
449449
logging.info("Listing: {0}".format(get_args['path']))
450-
if items is not None:
450+
if items:
451451
# list all the users folders only
452452
folders = self.filter_workspace_items(items, 'DIRECTORY')
453453
# should be no notebooks, but lets filter and can check later
@@ -522,7 +522,7 @@ def _recurse_log_all_workspace_items(folder):
522522
if num_nbs_plus:
523523
num_nbs += num_nbs_plus
524524
# log all repos
525-
if repos_log_writer is not None:
525+
if repos_log_writer and repos:
526526
for repo in repos:
527527
repo_path = repo.get('path', "")
528528
if not checkpoint_set.contains(repo_path) and not repo_path.startswith(tuple(exclude_prefixes)):

0 commit comments

Comments
 (0)