From 9c7691c891f534d62c350789f18f01ba9b0294c2 Mon Sep 17 00:00:00 2001 From: Akshay Joshi Date: Thu, 4 Feb 2021 14:50:26 +0530 Subject: [PATCH] Fixed an issue where utility(Backup, Maintenance, ...) jobs are failing when the log level is set to DEBUG. Fixes #6208 --- docs/en_US/release_notes_5_0.rst | 1 + web/pgadmin/misc/bgprocess/processes.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en_US/release_notes_5_0.rst b/docs/en_US/release_notes_5_0.rst index dc231d714..12737ea73 100644 --- a/docs/en_US/release_notes_5_0.rst +++ b/docs/en_US/release_notes_5_0.rst @@ -35,3 +35,4 @@ Bug fixes | `Issue #6180 `_ - Updated missing documentation for the 'Download Image' option in ERD. | `Issue #6187 `_ - Limit the upgrade check to run once per day. | `Issue #6193 `_ - Ensure that ERD throws a warning before closing unsaved changes if open in a new tab. +| `Issue #6208 `_ - Fixed an issue where utility(Backup, Maintenance, ...) jobs are failing when the log level is set to DEBUG. diff --git a/web/pgadmin/misc/bgprocess/processes.py b/web/pgadmin/misc/bgprocess/processes.py index 058d1702e..39852a33a 100644 --- a/web/pgadmin/misc/bgprocess/processes.py +++ b/web/pgadmin/misc/bgprocess/processes.py @@ -308,7 +308,7 @@ class BatchProcess(object): # if in debug mode, wait for process to complete and # get the stdout and stderr of popen. if config.CONSOLE_LOG_LEVEL <= logging.DEBUG: - output, error = self.get_process_output(cmd, env) + p = self.get_process_output(cmd, env) else: p = Popen( cmd, close_fds=True, stdout=None, stderr=None, stdin=None, @@ -361,7 +361,7 @@ class BatchProcess(object): current_app.logger.debug( 'Process Watcher Err:{0}'.format(errors)) - return output, errors + return p def preexec_function(self): import signal