Skip to content
This repository was archived by the owner on Feb 26, 2025. It is now read-only.

Commit aee07bd

Browse files
author
Jaquier Aurélien Tristan
committed
small improvement in add_nml_channel_to_nml_cell_file
1 parent eaedd14 commit aee07bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bluepyopt/neuroml/biophys.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,15 +192,15 @@ def add_nml_channel_to_nml_cell_file(
192192
channel_nml2_file = f"{channel_name}.channel.nml"
193193

194194
if channel_nml2_file not in included_channels:
195-
nml_mech_dir = get_nml_mech_dir()
196195
channel_new_path = Path(channel_dir) / channel_nml2_file
197196
cell_doc.includes.append(neuroml.IncludeType(href=channel_new_path))
198197

199198
# for some reason, pynml cannot accept absolute paths in IncludeType,
200199
# so copy paste files in current directory for the simulation to work
201200
if not skip_channels_copy:
202201
Path(channel_dir).mkdir(exist_ok=True)
203-
channel_path = Path(nml_mech_dir) / channel_nml2_file
202+
nml_mech_dir = Path(get_nml_mech_dir())
203+
channel_path = nml_mech_dir / channel_nml2_file
204204
if channel_path.is_file():
205205
shutil.copy(channel_path, channel_new_path)
206206

0 commit comments

Comments
 (0)