Skip to content

Commit

Permalink
Add missing re.escape in func.py _sync_remote_results_status_ll, and …
Browse files Browse the repository at this point in the history
…add test for the corresponding failure mode
  • Loading branch information
bernstei committed Feb 21, 2025
1 parent 875dfad commit 24730f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion expyre/func.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,7 +539,7 @@ def _grouper(n, iterable):
# get remote statuses and update in JobsDB
status_of_remote_id = system.scheduler.status([j['remote_id'] for j in jobs_to_sync], verbose=verbose)
for j in jobs_to_sync:
old_remote_status = list(config.db.jobs(id=j['id']))[0]['remote_status']
old_remote_status = list(config.db.jobs(id=re.escape(j['id'])))[0]['remote_status']
new_remote_status = status_of_remote_id[j['remote_id']]
if old_remote_status != new_remote_status:
if cli:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_func.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ def do_work(sys_name):
# yet set up by conftest.py if imported outside the test function
from expyre.func import ExPyRe

xpr = ExPyRe('test', function=sum, args=[[1, 2, 3]])
xpr = ExPyRe('test+1', function=sum, args=[[1, 2, 3]])

print('job id', xpr.id)

Expand Down

0 comments on commit 24730f2

Please sign in to comment.