Skip to content

Commit 248cd43

Browse files
authored
fix accepting all Vapid key instances (#137) (#139)
confirmed source change
1 parent a2dbc6f commit 248cd43

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: pywebpush/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from cryptography.hazmat.backends import default_backend
2020
from cryptography.hazmat.primitives.asymmetric import ec
2121
from cryptography.hazmat.primitives import serialization
22-
from py_vapid import Vapid
22+
from py_vapid import Vapid, Vapid01
2323

2424

2525
class WebPushException(Exception):
@@ -458,7 +458,7 @@ def webpush(subscription_info,
458458
vapid_claims['exp']))
459459
if not vapid_private_key:
460460
raise WebPushException("VAPID dict missing 'private_key'")
461-
if isinstance(vapid_private_key, Vapid):
461+
if isinstance(vapid_private_key, Vapid01):
462462
vv = vapid_private_key
463463
elif os.path.isfile(vapid_private_key):
464464
# Presume that key from file is handled correctly by

0 commit comments

Comments
 (0)