From 9bdb5dac9e6029a8a712dbdd9377ef0e6e035456 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Tue, 10 Dec 2024 16:40:12 +0100 Subject: [PATCH] handle empty requirement line in python --- backend/windmill-worker/src/python_executor.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/windmill-worker/src/python_executor.rs b/backend/windmill-worker/src/python_executor.rs index c047921ece..6016c9349c 100644 --- a/backend/windmill-worker/src/python_executor.rs +++ b/backend/windmill-worker/src/python_executor.rs @@ -1107,7 +1107,7 @@ async fn handle_python_deps( let mut venv_path = handle_python_reqs( requirements .split("\n") - .filter(|x| !x.starts_with("--")) + .filter(|x| !x.starts_with("--") && !x.trim().is_empty()) .collect(), job_id, w_id, @@ -1452,7 +1452,7 @@ pub async fn handle_python_reqs( let mut in_cache = vec![]; for req in requirements { // Ignore python version annotation backed into lockfile - if req.starts_with('#') { + if req.starts_with('#') || req.starts_with('-') || req.trim().is_empty() { continue; } // TODO: Remove