Skip to content

Commit eb364e5

Browse files
committed
python: do not assume JobList ids are type JobID
Problem: The JobList class allows the user to optionally set jobids to lookup. It assumes the jobids passed in are always of type JobID, but that is not always a valid assumption. When initializing the JobList object, map all input ids to JobID before internally storing them.
1 parent bb6229b commit eb364e5

File tree

1 file changed

+2
-1
lines changed
  • src/bindings/python/flux/job

1 file changed

+2
-1
lines changed

src/bindings/python/flux/job/list.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313

1414
import flux.constants
1515
from flux.future import WaitAllFuture
16+
from flux.job import JobID
1617
from flux.job.info import JobInfo
1718
from flux.rpc import RPC
1819

@@ -211,7 +212,7 @@ def __init__(
211212
self.since = since
212213
self.name = name
213214
self.queue = queue
214-
self.ids = ids
215+
self.ids = list(map(JobID, ids)) if ids else None
215216
self.errors = []
216217
for fname in filters:
217218
for x in fname.split(","):

0 commit comments

Comments
 (0)