Skip to content

Commit

Permalink
Temporarily fixes #47 (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
Helveg committed Sep 15, 2020
1 parent 7ea8fb7 commit d2157ac
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions bsb/simulators/neuron/adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@
import traceback


try:
import neuron

_has_neuron = True
except ImportError:
_has_neuron = False


class NeuronCell(SimulationCell):
node_name = "simulations.?.cell_models"

Expand All @@ -35,7 +43,7 @@ class NeuronCell(SimulationCell):
def boot(self):
super().boot()
self.instances = []
if not self.relay:
if not self.relay and _has_neuron:
self.model_class = get_configurable_class(self.model)
self.cell_type = self.scaffold.get_cell_type(self.name)

Expand All @@ -47,7 +55,7 @@ def validate(self):
raise ConfigurationError(
"Missing required attribute 'model' in " + self.get_config_node()
)
if not self.relay:
if not self.relay and _has_neuron:
self.model_class = get_configurable_class(self.model)

def get_parameters(self):
Expand Down

0 comments on commit d2157ac

Please sign in to comment.