Skip to content
This repository was archived by the owner on Jan 13, 2021. It is now read-only.

Commit 88d4e67

Browse files
committed
HTTP20Connection: Fix use of h2.settings
Fixes #372
1 parent 18b629b commit 88d4e67

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

hyper/http20/connection.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"""
88
import h2.connection
99
import h2.events
10-
import h2.settings
10+
from h2.settings import SettingCodes
1111

1212
from ..compat import ssl
1313
from ..tls import wrap_socket, H2_NPN_PROTOCOLS, H2C_PROTOCOL
@@ -403,7 +403,7 @@ def _connect_upgrade(self, sock):
403403
with self._conn as conn:
404404
conn.initiate_upgrade_connection()
405405
conn.update_settings(
406-
{h2.settings.ENABLE_PUSH: int(self._enable_push)}
406+
{SettingCodes.ENABLE_PUSH: int(self._enable_push)}
407407
)
408408
self._send_outstanding_data()
409409

@@ -424,7 +424,7 @@ def _send_preamble(self):
424424
with self._conn as conn:
425425
conn.initiate_connection()
426426
conn.update_settings(
427-
{h2.settings.ENABLE_PUSH: int(self._enable_push)}
427+
{SettingCodes.ENABLE_PUSH: int(self._enable_push)}
428428
)
429429
self._send_outstanding_data()
430430

0 commit comments

Comments
 (0)