Skip to content

Commit

Permalink
Merge pull request #134 from AI-Planning/enhsp-server-fix
Browse files Browse the repository at this point in the history
Enhsp server fix
  • Loading branch information
haz authored Nov 8, 2023
2 parents 24dc506 + 3c7323e commit 7c02cb0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
8 changes: 5 additions & 3 deletions planutils/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,17 +144,19 @@ def remote(target, options):
sys.exit(f"Call string does not match the remote call: {remote_package['endpoint']['services']['solve']['call']}")

call_map = {}
index = 0
for i, step in enumerate(call_parts[1:]):
if '{' == step[0] and '}' == step[-1]:
option = step[1:-1]
call_map[option] = options[i]
call_map[option] = options[index]
if option not in args:
sys.exit(f"Option {option} from call string is not defined in the remote call: {remote_call}")
if args[option]['type'] == 'file':
with open(options[i], 'r') as f:
with open(options[index], 'r') as f:
json_options[option] = f.read()
else:
json_options[option] = options[i]
json_options[option] = options[index]
index += 1

rcall = remote_call
for k, v in call_map.items():
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
long_description = fh.read()

setuptools.setup(name='planutils',
version='0.10.9',
version='0.10.10',
description='General library for setting up linux-based environments for developing, running, and evaluating planners.',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 7c02cb0

Please sign in to comment.