From 067508239b7e1237f696fbe4a2b1484e6f720ebd Mon Sep 17 00:00:00 2001 From: Sandro Bonazzola Date: Mon, 15 Dec 2014 17:53:57 +0000 Subject: [PATCH 25/93] [postgresql] avoid to crash with numerical passwords Signed-off-by: Sandro Bonazzola Signed-off-by: Bryn M. Reeves --- sos/plugins/postgresql.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py index 350131f..0a51074 100644 --- a/sos/plugins/postgresql.py +++ b/sos/plugins/postgresql.py @@ -51,7 +51,7 @@ class PostgreSQL(Plugin): # is no need to save and restore environment variables if the user # decided to pass the password on the command line. if self.get_option("password") is not False: - os.environ["PGPASSWORD"] = self.get_option("password") + os.environ["PGPASSWORD"] = str(self.get_option("password")) if self.get_option("dbhost"): cmd = "pg_dump -U %s -h %s -p %s -w -f %s -F t %s" % ( -- 1.9.3