From 128552180e77a65c02d911fc5522587eb2b94da3 Mon Sep 17 00:00:00 2001 From: Roy Hyunjin Han Date: Sat, 14 Apr 2012 13:03:04 -0400 Subject: [PATCH] Force port to be an integer --- .gitignore | 8 ++++++++ socketIO/__init__.py | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..15e22ab --- /dev/null +++ b/.gitignore @@ -0,0 +1,8 @@ +*~ +*.egg-info +*.pyc +*.swo +*.swp +.coverage +build +dist diff --git a/socketIO/__init__.py b/socketIO/__init__.py index 07fd24c..1299268 100644 --- a/socketIO/__init__.py +++ b/socketIO/__init__.py @@ -8,7 +8,7 @@ class SocketIO(object): def __init__(self, host, port): self.host = host - self.port = port + self.port = int(port) self.__do_handshake() self.__connect() self.heartbeatThread = RhythmicThread(self.heartbeatTimeout - 2, self.__send_heartbeat)