Skip to content
This repository was archived by the owner on May 17, 2024. It is now read-only.
Prev Previous commit
Next Next commit
changed ValueError to KeyError
  • Loading branch information
Matthias Ekundayo committed Aug 3, 2022
commit 9d579cdcbef93e8f991229b40f418a098656d8d2
3 changes: 2 additions & 1 deletion data_diff/databases/presto.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from logging import raiseExceptions
import re
from .database_types import *
from .base import Database, import_helper, _query_conn
Expand Down Expand Up @@ -46,7 +47,7 @@ def __init__(self, **kw):
# if auth=basic, add basic authenticator for Presto
kw["auth"] = prestodb.auth.BasicAuthentication(kw.pop("user"), kw.pop("password"))
except:
raise ValueError("User or password cannot be missing if auth==basic")
raise KeyError("User or password cannot be missing if auth==basic")

if "cert" in kw: # if a certificate was specified in URI, verify session with cert
cert = kw.pop("cert")
Expand Down
2 changes: 1 addition & 1 deletion data_diff/databases/snowflake.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def __init__(self, *, schema: str, **kw):
with open(kw.get("key"), "rb") as key:
p_key = serialization.load_pem_private_key(
key.read(),
password=None if not kw.get("password") else kw.pop("password"),
password=kw.pop("password", None),
backend=default_backend(),
)

Expand Down