Blame SOURCES/sos-bz1932772-candlepin-foreman_psql_with_--no-password_2.patch

4b1b63
From f04fc149a051e7519b9fe375f47e4d4bae79833c Mon Sep 17 00:00:00 2001
4b1b63
From: Jan Jansky <jjansky@redhat.com>
4b1b63
Date: Mon, 1 Mar 2021 13:22:16 +0100
4b1b63
Subject: [PATCH] [candlepin] call psql with --no-password to avoid waiting on
4b1b63
 input
4b1b63
4b1b63
Backport #2422 to legacy-3.9.
4b1b63
4b1b63
Signed-off-by: Jan Jansky <jjansky@redhat.com>
4b1b63
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
4b1b63
---
4b1b63
 sos/plugins/candlepin.py | 3 ++-
4b1b63
 1 file changed, 2 insertions(+), 1 deletion(-)
4b1b63
4b1b63
diff --git a/sos/plugins/candlepin.py b/sos/plugins/candlepin.py
4b1b63
index 243b5f5..e51c646 100644
4b1b63
--- a/sos/plugins/candlepin.py
4b1b63
+++ b/sos/plugins/candlepin.py
4b1b63
@@ -92,7 +92,8 @@ class Candlepin(Plugin, RedHatPlugin):
4b1b63
         a large amount of quoting in sos logs referencing the command being run
4b1b63
         """
4b1b63
         csvformat = "-A -F , -X" if csv else ""
4b1b63
-        _dbcmd = "psql -h %s -p 5432 -U candlepin -d candlepin %s -c %s"
4b1b63
+        _dbcmd = "psql --no-password -h %s -p 5432 -U candlepin \
4b1b63
+                  -d candlepin %s -c %s"
4b1b63
         return _dbcmd % (self.dbhost, csvformat, quote(query))
4b1b63
 
4b1b63
     def postproc(self):
4b1b63
-- 
4b1b63
1.8.3.1
4b1b63