tqm: Use correct warning methods (#85434)

* Use display.error_as_warning instead of self.warning
* Use display.error_as_warning instead of display.warning_as_error.

Signed-off-by: Abhijeet Kasurde <Akasurde@redhat.com>
pull/85555/head
Abhijeet Kasurde 4 months ago committed by GitHub
parent ee297bb7ca
commit ea238c9eb5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -0,0 +1,4 @@
---
bugfixes:
- tqm - use display.error_as_warning instead of self.warning.
- tqm - use display.error_as_warning instead of display.warning_as_error.

@ -179,7 +179,7 @@ class TaskQueueManager:
for fd in (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO): for fd in (STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO):
os.set_inheritable(fd, False) os.set_inheritable(fd, False)
except Exception as ex: except Exception as ex:
self.warning(f"failed to set stdio as non inheritable: {ex}") display.error_as_warning("failed to set stdio as non inheritable", exception=ex)
self._callback_lock = threading.Lock() self._callback_lock = threading.Lock()
@ -269,7 +269,7 @@ class TaskQueueManager:
display.warning("Skipping callback '%s', as it does not create a valid plugin instance." % callback_name) display.warning("Skipping callback '%s', as it does not create a valid plugin instance." % callback_name)
continue continue
except Exception as ex: except Exception as ex:
display.warning_as_error(f"Failed to load callback plugin {callback_name!r}.", exception=ex) display.error_as_warning(f"Failed to load callback plugin {callback_name!r}.", exception=ex)
continue continue
def run(self, play): def run(self, play):

Loading…
Cancel
Save