Skip to content

Commit

Permalink
race condition null value fix
Browse files Browse the repository at this point in the history
  • Loading branch information
supertick committed Oct 24, 2023
1 parent a8892ae commit d0d44d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/main/java/org/myrobotlab/service/Python.java
Original file line number Diff line number Diff line change
Expand Up @@ -985,6 +985,9 @@ public PythonConfig apply(PythonConfig c) {
*/
public List<String> getScriptList() throws IOException {
List<String> sorted = new ArrayList<>();
if (config.scriptRootDir == null) {
config.scriptRootDir = new File(getDataInstanceDir()).getAbsolutePath();
}
List<File> files = FileIO.getFileList(config.scriptRootDir, true);
for (File file : files) {
if (file.toString().endsWith(".py")) {
Expand Down

0 comments on commit d0d44d0

Please sign in to comment.