Move to python3 style division.

All of these are currently integer division in python2.
This commit is contained in:
Ahmed Charles 2015-10-19 05:26:10 +00:00
parent c8fbd2860d
commit cbe1eefcf0
12 changed files with 18 additions and 9 deletions

View file

@ -130,8 +130,8 @@ def complete_hybi00(headers, challenge):
key1 = headers["Sec-WebSocket-Key1"]
key2 = headers["Sec-WebSocket-Key2"]
first = int("".join(i for i in key1 if i in digits)) / key1.count(" ")
second = int("".join(i for i in key2 if i in digits)) / key2.count(" ")
first = int("".join(i for i in key1 if i in digits)) // key1.count(" ")
second = int("".join(i for i in key2 if i in digits)) // key2.count(" ")
nonce = pack(">II8s", first, second, challenge)