Skip to content

Commit

Permalink
dict needs to be supported
Browse files Browse the repository at this point in the history
  • Loading branch information
robnagler committed Jan 19, 2024
1 parent a5f6dbd commit 3a92097
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions sirepo/pkcli/job_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,13 @@ def _recv():
r = globals()["_do_" + m.jobCmd](
m, sirepo.template.import_module(m.simulationType)
)
if isinstance(r, dict):
# Backwards compatibility
r = PKDict(r)
if isinstance(r, PKDict):
r = PKDict(r).pksetdefault(state=job.COMPLETED)
r.setdefault("state", job.COMPLETED)
else:
pkdlog("fuction={} failed to return a PKDict", m.jobCmd)
pkdlog("func={} failed to return a PKDict", m.jobCmd)
r = PKDict(state=job.ERROR, error="invalid return value")
c = 0
except _AbruptSocketCloseError:
Expand Down

0 comments on commit 3a92097

Please sign in to comment.