From d0d44d049e91bb19584b1e655f4d80f4f3d3690f Mon Sep 17 00:00:00 2001 From: grog Date: Tue, 24 Oct 2023 06:18:26 -0700 Subject: [PATCH] race condition null value fix --- src/main/java/org/myrobotlab/service/Python.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/main/java/org/myrobotlab/service/Python.java b/src/main/java/org/myrobotlab/service/Python.java index 18329e7b2e..e8c2fee02e 100644 --- a/src/main/java/org/myrobotlab/service/Python.java +++ b/src/main/java/org/myrobotlab/service/Python.java @@ -985,6 +985,9 @@ public PythonConfig apply(PythonConfig c) { */ public List getScriptList() throws IOException { List sorted = new ArrayList<>(); + if (config.scriptRootDir == null) { + config.scriptRootDir = new File(getDataInstanceDir()).getAbsolutePath(); + } List files = FileIO.getFileList(config.scriptRootDir, true); for (File file : files) { if (file.toString().endsWith(".py")) {