Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed indent issue #30

Merged
merged 1 commit into from
Mar 15, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions pystackql/stackql.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,20 +256,20 @@ def __init__(self,
except OSError as e:
raise ValueError(f"Unable to create the log directory {log_dir}: {str(e)}")

if self.server_mode:
# server mode, connect to a server via the postgres wire protocol
if self.server_mode:
# server mode, connect to a server via the postgres wire protocol
# Attempt to import psycopg2 only if server_mode is True
global psycopg2, RealDictCursor
try:
import psycopg2
from psycopg2.extras import RealDictCursor
except ImportError:
raise ImportError("psycopg2 is required in server mode but is not installed. Please install psycopg2 and try again.")

self.server_address = server_address
global psycopg2, RealDictCursor
try:
import psycopg2
from psycopg2.extras import RealDictCursor
except ImportError:
raise ImportError("psycopg2 is required in server mode but is not installed. Please install psycopg2 and try again.")

self.server_address = server_address
self.server_port = server_port
# establish the connection
self._conn = self._connect_to_server()
self._conn = self._connect_to_server()
else:
# local mode, executes the binary locally
self.params = []
Expand Down
Loading