Skip to content

Commit 6b1f33f

Browse files
authored
Update o2_dpg_workflow_runner.py
protect setting nice value against exception
1 parent 2e31c7c commit 6b1f33f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

MC/bin/o2_dpg_workflow_runner.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,11 @@ def submit(self, tid, nice=0):
430430
taskenv.update(self.workflowspec['stages'][tid]['env'])
431431

432432
p = psutil.Popen(['/bin/bash','-c',c], cwd=workdir, env=taskenv)
433-
p.nice(nice)
434-
self.nicevalues[tid]=nice
433+
try:
434+
p.nice(nice)
435+
self.nicevalues[tid]=nice
436+
except (psutil.NoSuchProcess, psutil.AccessDenied):
437+
self.nicevalues[tid]=0
435438
return p
436439

437440
def ok_to_submit(self, tid, backfill=False):

0 commit comments

Comments
 (0)