From 3843124ba45df4b36c8cd1c8ffca2a96fda48065 Mon Sep 17 00:00:00 2001 From: nmannall Date: Mon, 11 Dec 2023 16:30:02 +0000 Subject: [PATCH] Fix default scene arg being overwritten - Repeat calls of gprMax.run() would reuse scene data from the last call --- gprMax/config.py | 2 +- gprMax/gprMax.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gprMax/config.py b/gprMax/config.py index 95d65985..4896028b 100644 --- a/gprMax/config.py +++ b/gprMax/config.py @@ -279,7 +279,7 @@ class SimulationConfig: # Scenes parameter may not exist if user enters via CLI try: - self.scenes = args.scenes + self.scenes = args.scenes if args.scenes is not None else [] except AttributeError: self.scenes = [] diff --git a/gprMax/gprMax.py b/gprMax/gprMax.py index dd68a2ff..197ed91a 100644 --- a/gprMax/gprMax.py +++ b/gprMax/gprMax.py @@ -25,7 +25,7 @@ from .utilities.logging import logging_config # Arguments (used for API) and their default values (used for API and CLI) args_defaults = { - "scenes": [], + "scenes": None, "inputfile": None, "outputfile": None, "n": 1,