Skip to content

Commit 1df90a7

Browse files
authored
Merge pull request #177 from GREENRAT-K405/dev
fix code bug: broken file path
2 parents 8e7d0ee + 0c1b0df commit 1df90a7

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

concore.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ def safe_literal_eval(filename, defaultValue):
125125
inpath = "./in" #must be rel path for local
126126
outpath = "./out"
127127
simtime = 0
128-
concore_params_file = os.path.join(inpath, "1", "concore.params")
129-
concore_maxtime_file = os.path.join(inpath, "1", "concore.maxtime")
128+
concore_params_file = os.path.join(inpath + "1", "concore.params")
129+
concore_maxtime_file = os.path.join(inpath + "1", "concore.maxtime")
130130

131131
#9/21/22
132132
# ===================================================================
@@ -221,7 +221,7 @@ def read(port_identifier, name, initstr_val):
221221
return default_return_val
222222

223223
time.sleep(delay)
224-
file_path = os.path.join(inpath, str(file_port_num), name)
224+
file_path = os.path.join(inpath + str(file_port_num), name)
225225
ins = ""
226226

227227
try:
@@ -289,7 +289,7 @@ def write(port_identifier, name, val, delta=0):
289289
# Case 2: File-based port
290290
try:
291291
file_port_num = int(port_identifier)
292-
file_path = os.path.join(outpath, str(file_port_num), name)
292+
file_path = os.path.join(outpath + str(file_port_num), name)
293293
except ValueError:
294294
print(f"Error: Invalid port identifier '{port_identifier}' for file operation. Must be integer or ZMQ name.")
295295
return

0 commit comments

Comments
 (0)