diff options
author | Sandro Bonazzola <sbonazzo redhat com> | 2014-12-15 17:53:57 +0000 |
---|---|---|
committer | Bryn M. Reeves <bmr@redhat.com> | 2014-12-15 17:53:57 +0000 |
commit | 067508239b7e1237f696fbe4a2b1484e6f720ebd (patch) | |
tree | 23f459ff9ce765a2434e93dd6fd322826809867c | |
parent | f0ad2e331ce0524d36f59f3dee5cf85e6b22b089 (diff) | |
download | sos-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.py | 2 |
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" % ( |