Skip to content

Commit 65214b6

Browse files
committed
trap a possible exception during database request
1 parent bbe41ff commit 65214b6

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

python/soma_workflow/gui/workflowGui.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@
140140
from soma_workflow.test.workflow_tests import WorkflowExamplesShared
141141
from soma_workflow.test.workflow_tests import WorkflowExamplesSharedTransfer
142142
from soma_workflow.test.workflow_tests import WorkflowExamplesTransfer
143-
from soma_workflow.errors import UnknownObjectError, ConfigurationError, SerializationError, WorkflowError, JobError, ConnectionError
143+
from soma_workflow.errors import UnknownObjectError, ConfigurationError, SerializationError, WorkflowError, JobError, ConnectionError, DatabaseError
144144
import soma_workflow.version as version
145145

146146
import six
@@ -5508,8 +5508,13 @@ def updateStdOutErr(self, connection):
55085508

55095509
def update_job_command(self, connection):
55105510
if self.job_id != NOT_SUBMITTED_JOB_ID:
5511-
command = connection.get_job_command(self.job_id)
5512-
self.command = command
5511+
try:
5512+
command = connection.get_job_command(self.job_id)
5513+
self.command = command
5514+
except DatabaseError:
5515+
# if the job / workflow has been deleted in the meantime,
5516+
# then just do nothoing.
5517+
pass
55135518

55145519
def update_job_params(self, connection):
55155520
if self.job_id != NOT_SUBMITTED_JOB_ID:

0 commit comments

Comments
 (0)