Added check if the Windows version is not supporting the ConPty or WinPty disable the PSQL for that version.

refs #2341
This commit is contained in:
Nikhil Mohite
2021-06-14 11:45:54 +05:30
committed by Akshay Joshi
parent dcaeb20e29
commit 09693d14d1
6 changed files with 51 additions and 39 deletions

View File

@@ -20,7 +20,12 @@ from ... import socketio as sio
from pgadmin.utils import get_complete_file_path
if _platform == 'win32':
from winpty import PtyProcess
# Check Windows platform support for WinPty api, Disable psql
# if not supporting
try:
from winpty import PtyProcess
except ImportError as error:
config.ENABLE_PSQL = False
else:
import fcntl
import termios