From 6809e7ea7fa6e5ede6d25de185fccadad7843eba Mon Sep 17 00:00:00 2001 From: "Christian Y. Brenninkmeijer" Date: Fri, 25 Aug 2023 08:41:30 +0100 Subject: [PATCH] config methods which do and do not return none --- spinnaker_graph_front_end/spinnaker.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/spinnaker_graph_front_end/spinnaker.py b/spinnaker_graph_front_end/spinnaker.py index 160a8e10..a93f1ba5 100644 --- a/spinnaker_graph_front_end/spinnaker.py +++ b/spinnaker_graph_front_end/spinnaker.py @@ -13,7 +13,7 @@ # limitations under the License. import logging -from spinn_utilities.config_holder import get_config_str +from spinn_utilities.config_holder import is_config_none from spinn_utilities.log import FormatAdapter from spinn_front_end_common.data import FecDataView from spinn_front_end_common.interface.abstract_spinnaker_base import ( @@ -26,8 +26,10 @@ def _is_allocated_machine(): - return (get_config_str("Machine", "spalloc_server") or - get_config_str("Machine", "remote_spinnaker_url")) + if is_config_none("Machine", "spalloc_server"): + return not is_config_none(("Machine", "remote_spinnaker_url")) + else: + return True class SpiNNaker(AbstractSpinnakerBase):