Skip to content

Commit

Permalink
Update travis + tox
Browse files Browse the repository at this point in the history
  • Loading branch information
jpadilla committed Dec 27, 2019
1 parent 36500dd commit 6c3000a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ matrix:
- python: 3.6
env: TOXENV=py36-crypto,py36-nocrypto,py36-contrib_crypto
- python: 3.7
env: TOXENV=lint,typing,py37-crypto,py37-nocrypto,py37-contrib_crypto
env: TOXENV=py37-crypto,py37-nocrypto,py37-contrib_crypto
- python: 3.8
env: TOXENV=py38-crypto,py38-nocrypto,py38-contrib_crypto
env: TOXENV=lint,typing,py38-crypto,py38-nocrypto,py38-contrib_crypto
install:
- pip install -U pip
- pip install -U tox coveralls
Expand Down
8 changes: 5 additions & 3 deletions jwt/jwks_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@

try:
import requests

has_requests = True
except ImportError:
requests = None
has_requests = False


class PyJWKClient:
def __init__(self, uri):
if not requests:
if not has_requests:
raise PyJWKClientError(
"Missing dependencies for `PyJWKClient`. Run `pip install pyjwt[jwks-client]` to install dependencies."
)
Expand Down Expand Up @@ -49,7 +51,7 @@ def get_signing_key(self, kid):

if not signing_key:
raise PyJWKClientError(
'Unable to find a signing key that matches: "{kid}"'.format(kid)
'Unable to find a signing key that matches: "{}"'.format(kid)
)

return signing_key
Expand Down

0 comments on commit 6c3000a

Please sign in to comment.