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

Commit

Permalink
Fix h2.settings.SettingCodes usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
hwms committed Feb 23, 2020
1 parent adb491e commit 47c520b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions hyper/http20/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ def _connect_upgrade(self, sock):
with self._conn as conn:
conn.initiate_upgrade_connection()
conn.update_settings(
{h2.settings.ENABLE_PUSH: int(self._enable_push)}
{h2.settings.SettingCodes.ENABLE_PUSH: int(self._enable_push)}
)
self._send_outstanding_data()

Expand All @@ -424,7 +424,7 @@ def _send_preamble(self):
with self._conn as conn:
conn.initiate_connection()
conn.update_settings(
{h2.settings.ENABLE_PUSH: int(self._enable_push)}
{h2.settings.SettingCodes.ENABLE_PUSH: int(self._enable_push)}
)
self._send_outstanding_data()

Expand Down
3 changes: 2 additions & 1 deletion test/test_hyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,7 +766,8 @@ def test_incrementing_window_after_close(self):
# the default max frame size (16,384 bytes). That will, on the third
# frame, trigger the processing to increment the flow control window,
# which should then not happen.
f = SettingsFrame(0, settings={h2.settings.INITIAL_WINDOW_SIZE: 100})
f = SettingsFrame(0, settings={
h2.settings.SettingCodes.INITIAL_WINDOW_SIZE: 100})

c = HTTP20Connection('www.google.com')
c._sock = DummySocket()
Expand Down

0 comments on commit 47c520b

Please sign in to comment.