From 326c53d6c4ca41afa7491660f93ba91d91f1cb7f Mon Sep 17 00:00:00 2001 From: Toby Harradine Date: Tue, 27 Aug 2019 14:25:05 +1000 Subject: [PATCH] Quick fix for postgres config details prompt (#2951) Signed-off-by: Toby Harradine --- redbot/core/drivers/postgres/postgres.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redbot/core/drivers/postgres/postgres.py b/redbot/core/drivers/postgres/postgres.py index 926052b05..f46b64298 100644 --- a/redbot/core/drivers/postgres/postgres.py +++ b/redbot/core/drivers/postgres/postgres.py @@ -58,7 +58,7 @@ class PostgresDriver(BaseDriver): def get_config_details(): unixmsg = ( "" - if sys.platform != "win32" + if sys.platform == "win32" else ( " - Common directories for PostgreSQL Unix-domain sockets (/run/postgresql, " "/var/run/postgresl, /var/pgsql_socket, /private/tmp, and /tmp),\n" @@ -104,7 +104,7 @@ class PostgresDriver(BaseDriver): or None ) - passfile = r"%APPDATA%\postgresql\pgpass.conf" if sys.platform != "win32" else "~/.pgpass" + passfile = r"%APPDATA%\postgresql\pgpass.conf" if sys.platform == "win32" else "~/.pgpass" password = getpass.getpass( f"Enter the PostgreSQL server password. The input will be hidden.\n" f" NOTE: If using ident/peer authentication (no password), enter NONE.\n"