From 5da10e58ebd542375cbb56ffc36ee5df40037b71 Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Tue, 10 Mar 2020 08:33:54 +0000 Subject: [PATCH] Ignore null entries Not sure how or why they're there, but sure. --- files/bin/code-project-list | 2 ++ 1 file changed, 2 insertions(+) diff --git a/files/bin/code-project-list b/files/bin/code-project-list index 8688fc0..bdab0fe 100755 --- a/files/bin/code-project-list +++ b/files/bin/code-project-list @@ -27,6 +27,8 @@ def get_vscode_project_dirs(): vscode_config = json.loads(VSCODE_CONFIG_FILE.read_text()) for recent_path in itertools.chain(*vscode_config['openedPathsList'].values()): + if not recent_path: + continue recent_path_path = Path(recent_path.replace('file://', '')) if recent_path_path.exists(): yield recent_path_path