Skip to content

Commit 9c209e5

Browse files
committed
DISPATCH-2147: Fix some import errors with the quart framework that was preventing the HTTP2 server from starting. This closes #1230.
1 parent ac8b1ce commit 9c209e5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

tests/http2_server.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,16 @@
1919
import system_test
2020
import os
2121
from quart import Quart, request
22-
from quart.static import send_file
23-
from quart.exceptions import HTTPStatusException
22+
try:
23+
from quart.static import send_file
24+
except ImportError:
25+
from quart.helpers import send_file
26+
27+
try:
28+
from quart.exceptions import HTTPStatusException
29+
except ImportError:
30+
from werkzeug.exceptions import InternalServerError as HTTPStatusException
31+
2432
import json
2533
app = Quart(__name__)
2634

0 commit comments

Comments
 (0)