Skip to content

Commit 3139b7e

Browse files
committed
change from type() to isinstance())
type() check for exact match, which failed to detect the subclass used by WS4PY
1 parent 2db4852 commit 3139b7e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ws4py/server/cherrypyserver.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,9 +272,9 @@ def _set_internal_flags(self):
272272
break
273273
_locals = current.f_locals
274274
if 'self' in _locals:
275-
if type(_locals['self']) == HTTPRequest:
275+
if isinstance(_locals['self'], HTTPRequest):
276276
_locals['self'].close_connection = True
277-
if type(_locals['self']) == HTTPConnection:
277+
if isinstance(_locals['self'], HTTPConnection):
278278
_locals['self'].linger = True
279279
# HTTPConnection is more inner than
280280
# HTTPRequest so we can leave once

0 commit comments

Comments
 (0)