Quick fix for postgres config details prompt (#2951)

Signed-off-by: Toby Harradine <tobyharradine@gmail.com>
This commit is contained in:
Toby Harradine 2019-08-27 14:25:05 +10:00 committed by GitHub
parent d1a46acc9a
commit 326c53d6c4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -58,7 +58,7 @@ class PostgresDriver(BaseDriver):
def get_config_details(): def get_config_details():
unixmsg = ( unixmsg = (
"" ""
if sys.platform != "win32" if sys.platform == "win32"
else ( else (
" - Common directories for PostgreSQL Unix-domain sockets (/run/postgresql, " " - Common directories for PostgreSQL Unix-domain sockets (/run/postgresql, "
"/var/run/postgresl, /var/pgsql_socket, /private/tmp, and /tmp),\n" "/var/run/postgresl, /var/pgsql_socket, /private/tmp, and /tmp),\n"
@ -104,7 +104,7 @@ class PostgresDriver(BaseDriver):
or None 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( password = getpass.getpass(
f"Enter the PostgreSQL server password. The input will be hidden.\n" f"Enter the PostgreSQL server password. The input will be hidden.\n"
f" NOTE: If using ident/peer authentication (no password), enter NONE.\n" f" NOTE: If using ident/peer authentication (no password), enter NONE.\n"