Use print function, not print statement
print statement is no longer available in Python 3.
This commit is contained in:
parent
12dd0c738e
commit
9ffe1493da
|
|
@ -26,7 +26,7 @@ class WebSocketLoad(WebSockifyRequestHandler):
|
||||||
max_packet_size = 10000
|
max_packet_size = 10000
|
||||||
|
|
||||||
def new_websocket_client(self):
|
def new_websocket_client(self):
|
||||||
print "Prepopulating random array"
|
print("Prepopulating random array")
|
||||||
self.rand_array = []
|
self.rand_array = []
|
||||||
for i in range(0, self.max_packet_size):
|
for i in range(0, self.max_packet_size):
|
||||||
self.rand_array.append(random.randint(0, 9))
|
self.rand_array.append(random.randint(0, 9))
|
||||||
|
|
@ -37,7 +37,7 @@ class WebSocketLoad(WebSockifyRequestHandler):
|
||||||
|
|
||||||
self.responder(self.request)
|
self.responder(self.request)
|
||||||
|
|
||||||
print "accumulated errors:", self.errors
|
print("accumulated errors:", self.errors)
|
||||||
self.errors = 0
|
self.errors = 0
|
||||||
|
|
||||||
def responder(self, client):
|
def responder(self, client):
|
||||||
|
|
@ -57,7 +57,7 @@ class WebSocketLoad(WebSockifyRequestHandler):
|
||||||
err = self.check(frames)
|
err = self.check(frames)
|
||||||
if err:
|
if err:
|
||||||
self.errors = self.errors + 1
|
self.errors = self.errors + 1
|
||||||
print err
|
print(err)
|
||||||
|
|
||||||
if closed:
|
if closed:
|
||||||
break
|
break
|
||||||
|
|
@ -106,7 +106,7 @@ class WebSocketLoad(WebSockifyRequestHandler):
|
||||||
length = int(length)
|
length = int(length)
|
||||||
chksum = int(chksum)
|
chksum = int(chksum)
|
||||||
except ValueError:
|
except ValueError:
|
||||||
print "\n<BOF>" + repr(data) + "<EOF>"
|
print("\n<BOF>" + repr(data) + "<EOF>")
|
||||||
err += "Invalid data format\n"
|
err += "Invalid data format\n"
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue