8000 Update error message for cryptography package by srcole · Pull Request #769 · PyMySQL/PyMySQL · GitHub
[go: up one dir, main page]

Skip to content

Update error message for cryptography package #769

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

Merged
merged 3 commits into from
Jan 7, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump t 8000 o
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
update error message for cryptography package
  • Loading branch information
srcole authored Jan 6, 2019
commit b29efaeb5958ff6c7068f8f70050fba57bd73169
2 changes: 1 addition & 1 deletion pymysql/_auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def sha2_rsa_encrypt(password, salt, public_key):
Used for sha256_password and caching_sha2_password.
"""
if not _have_cryptography:
raise RuntimeError("cryptography is required for sha256_password or caching_sha2_password")
raise RuntimeError("The python package, cryptography, is required for sha256_password or caching_sha2_password. Obtain this package by running `pip install cryptography` and retry.")
message = _xor_password(password + b'\0', salt)
rsa_key = serialization.load_pem_public_key(public_key, default_backend())
return rsa_key.encrypt(
Expand Down
0