mirror of
https://github.com/xcat2/confluent.git
synced 2026-01-11 02:22:31 +00:00
Make hmac import optional
Some environments do not have this module
This commit is contained in:
@@ -16,12 +16,13 @@ import sys
|
||||
import struct
|
||||
import time
|
||||
import re
|
||||
import hmac
|
||||
import hashlib
|
||||
try:
|
||||
import json
|
||||
import hmac
|
||||
except ImportError:
|
||||
json = None
|
||||
hmac = None
|
||||
|
||||
class InvalidApiKey(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user