Skip to content

Commit 48eca6c

Browse files
committed
Added log message if process failed with exit code.
1 parent 6b6b59b commit 48eca6c

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

web/pgadmin/misc/bgprocess/processes.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -629,10 +629,11 @@ def status(self, out=0, err=0):
629629
'process_state': self.process_state
630630
}
631631

632-
# Set error message based on exit code if stderr is empty.
633-
if err_completed and len(stderr) == 0:
632+
# Get the error message based on exit code.
633+
if err_completed and self.ecode != 0:
634634
err_msg = get_error_msg(self.cmd, self.ecode)
635-
stderr.append([self.ecode, err_msg])
635+
# This should be the last line as added 'Z' for sorting.
636+
stderr.append(['Z', err_msg])
636637

637638
return {
638639
'out': {

0 commit comments

Comments
 (0)