We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d1a078b commit 9911f35Copy full SHA for 9911f35
adafruit_httpserver/response.py
@@ -17,9 +17,19 @@
17
import os
18
import json
19
from binascii import b2a_base64
20
-import hashlib
21
from errno import EAGAIN, ECONNRESET, ETIMEDOUT, ENOTCONN
22
+try:
23
+ try:
24
+ import hashlib
25
+ except ImportError:
26
+ import adafruit_hashlib as hashlib
27
+except ImportError:
28
+ print(
29
+ "WARNING: hashlib module not available and adafruit_hashlib not installed.",
30
+ "Websocket support will not work.",
31
+ )
32
+
33
from .exceptions import (
34
BackslashInPathError,
35
FileNotExistsError,
0 commit comments