working with most tests on twisted on py33/34

This commit is contained in:
HawkOwl
2015-05-11 16:39:37 +08:00
parent 97ecc95814
commit 43548b1917
3 changed files with 4 additions and 6 deletions

View File

@@ -1944,8 +1944,7 @@ class WebSocketProtocol(object):
#
if self.autoPingPending:
try:
p = payload.decode('utf8')
if p == self.autoPingPending:
if payload == self.autoPingPending:
if self.debugCodePaths:
self.factory._log("Auto ping/pong: received pending pong for auto-ping/pong")
@@ -2094,9 +2093,9 @@ class WebSocketProtocol(object):
self.autoPingPendingCall = None
self.autoPingPending = newid(self.autoPingSize)
self.autoPingPending = newid(self.autoPingSize).encode('utf8')
self.sendPing(self.autoPingPending.encode('utf8'))
self.sendPing(self.autoPingPending)
if self.autoPingTimeout:
if self.debugCodePaths:

View File

@@ -252,7 +252,7 @@ if os.environ.get('USE_TWISTED', False):
"""
auto-ping with correct reply cancels timeout
"""
if True:
if False:
self.proto.debug = True
self.proto.factory._log = print
self.proto.debugCodePaths = True

View File

@@ -112,7 +112,6 @@ except ImportError:
def process(self, data):
dlen = len(data)
print(data)
payload = array('B', data)
msk = self.mskarray[self.ptr & 3]
for k in xrange(dlen):