Skip to content

Commit

Permalink
config methods which do and do not return none
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Aug 25, 2023
1 parent b772918 commit 6809e7e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions spinnaker_graph_front_end/spinnaker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand All @@ -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):
Expand Down

0 comments on commit 6809e7e

Please sign in to comment.