Skip to content

Commit 03cf95b

Browse files
authored
Simple style changes
1 parent 8d10c56 commit 03cf95b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

python/py_vapid/__init__.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@
22
# License, v. 2.0. If a copy of the MPL was not distributed with this
33
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
44

5+
import os
6+
import logging
57
import base64
68
import time
79
import hashlib
810

911
import ecdsa
10-
import logging
1112
from jose import jws
1213

14+
1315
class VapidException(Exception):
1416
"""An exception wrapper for Vapid."""
1517
pass
@@ -24,6 +26,7 @@ class Vapid(object):
2426
def __init__(self, private_key_file=None, private_key=None):
2527
"""Initialize VAPID using an optional file containing a private key
2628
in PEM format.
29+
2730
:param private_key_file: The name of the file containing the
2831
private key
2932
"""
@@ -116,7 +119,6 @@ def sign(self, claims, crypto_key=None):
116119
:returns result: a hash containing the header fields to use in
117120
the subscription update.
118121
"""
119-
from jose import jws
120122
if not claims.get('exp'):
121123
claims['exp'] = int(time.time()) + 86400
122124
if not claims.get('sub'):

0 commit comments

Comments
 (0)