Skip to content

Commit

Permalink
Reformat data module from previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dlax committed Mar 18, 2021
1 parent aeed63e commit d31ebd8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pgactivity/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
import psutil
import psycopg2
import psycopg2.extras
from psycopg2.errors import InterfaceError, InvalidPassword, OperationalError, ProgrammingError
from psycopg2.errors import (
InterfaceError,
InvalidPassword,
OperationalError,
ProgrammingError,
)
from psycopg2.extensions import connection

from . import queries
Expand Down Expand Up @@ -398,7 +403,10 @@ def pg_connect(
except ProgrammingError as err:
errmsg = str(err).strip()
if errmsg.startswith("invalid dsn"):
raise SystemExit(f"ERROR: {errmsg}\nPlease refer to the 'Connection Control Functions' section of the PostgreSQL documentation")
raise SystemExit(
f"ERROR: {errmsg}\n"
"Please refer to the 'Connection Control Functions' section of the PostgreSQL documentation"
)
raise
else:
break
Expand Down

0 comments on commit d31ebd8

Please sign in to comment.