Skip to content

Commit

Permalink
Cleanup connection None
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedobbelaere committed Nov 22, 2022
1 parent e51c4d0 commit 827dab9
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions dbt/adapters/athena/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
from dbt.contracts.connection import Connection


def get_boto3_session(connection: Connection = None) -> boto3.session.Session:
if connection is None:
raise RuntimeError("A Connection object needs to be passed to initialize the boto3 session")

def get_boto3_session(connection: Connection) -> boto3.session.Session:
return boto3.session.Session(
region_name=connection.credentials.region_name,
profile_name=connection.credentials.aws_profile_name,
Expand Down

0 comments on commit 827dab9

Please sign in to comment.