Skip to content

Commit

Permalink
fix: invocation of pathlib.Path.open (#262)
Browse files Browse the repository at this point in the history
# Description

Fixes a bug in how `pathlib.Path.open` is invoked.
  • Loading branch information
haleemur authored Sep 23, 2024
1 parent d3c6e02 commit 81f4466
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion target_snowflake/connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ def get_private_key(self):
phrase = self.config.get("private_key_passphrase")
encoded_passphrase = phrase.encode() if phrase else None
if "private_key_path" in self.config:
with Path.open(self.config["private_key_path"], "rb") as key:
with Path(self.config["private_key_path"]).open("rb") as key:
key_content = key.read()
else:
key_content = self.config["private_key"].encode()
Expand Down

0 comments on commit 81f4466

Please sign in to comment.