aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSandro Bonazzola <sbonazzo redhat com>2014-12-15 17:53:57 +0000
committerBryn M. Reeves <bmr@redhat.com>2014-12-15 17:53:57 +0000
commit067508239b7e1237f696fbe4a2b1484e6f720ebd (patch)
tree23f459ff9ce765a2434e93dd6fd322826809867c
parentf0ad2e331ce0524d36f59f3dee5cf85e6b22b089 (diff)
downloadsos-067508239b7e1237f696fbe4a2b1484e6f720ebd.tar.gz
[postgresql] avoid to crash with numerical passwords
Signed-off-by: Sandro Bonazzola <sbonazzo redhat com> Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/postgresql.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sos/plugins/postgresql.py b/sos/plugins/postgresql.py
index 350131f3..0a51074a 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" % (