aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-13 04:22:17 +0200
committerMarek Siarkowicz <mareksiarkowicz@gmail.com>2015-06-13 04:22:17 +0200
commit2b55de38dcd540273fc66df8684ff105e7c74390 (patch)
tree963b95173524bf7b9e720af36c3bcc4db2cdc5ca
parent0be8866c0219b142a42ac552dfec320d1439d1e2 (diff)
downloadpyParrotZikTCP-2b55de38dcd540273fc66df8684ff105e7c74390.tar.xz
pyParrotZikTCP-2b55de38dcd540273fc66df8684ff105e7c74390.zip
Ignore not anwser responses.
Diffstat (limited to '')
-rw-r--r--ParrotZik.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/ParrotZik.py b/ParrotZik.py
index 638391a..efa8732 100644
--- a/ParrotZik.py
+++ b/ParrotZik.py
@@ -92,8 +92,10 @@ class ParrotZikApi(object):
self.sock.recv(30)
else:
self.sock.recv(7)
- data = self.sock.recv(1024)
- data = BeautifulSoup(data)
+
+ data = BeautifulSoup(self.sock.recv(1024))
+ if not hasattr(data, 'anwser'):
+ data = BeautifulSoup(self.sock.recv(1024))
return data
def close(self):