Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "rda_python_common"
version = "1.0.25"
version = "1.0.26"
authors = [
{ name="Zaihua Ji", email="zji@ucar.edu" },
]
Expand Down
18 changes: 12 additions & 6 deletions src/rda_python_common/PgSIG.py
Original file line number Diff line number Diff line change
Expand Up @@ -816,16 +816,22 @@ def get_pbs_info(qopts, multiple = 0, logact = 0, chkcnt = 1):
if re.match(r'^-----', line): chkd = 0
else:
vals = re.split(r'\s+', PgLOG.pgtrim(line))
if len(vals) == kcnt:
vcnt = len(vals)
if vcnt == 1:
if multiple:
stat[ckeys[kcnt-1]].append(vals[0])
else:
stat[ckeys[kcnt-1]] = vals[0]
break
elif vcnt > 1:
ms = re.match(r'^(\d+)', vals[0])
if ms: vals[0] = ms.group(1)
if multiple:
for i in range(kcnt):
for i in range(vcnt):
if multiple:
stat[ckeys[i]].append(vals[i])
else:
for i in range(kcnt):
else:
stat[ckeys[i]] = vals[i]
break
if vcnt == kcnt: break

return stat

Expand Down