Ajout d'un peu de debugennww

This commit is contained in:
hadware
2018-05-31 16:20:15 +02:00
parent 802a7b99a1
commit 22f5e2b508
5 changed files with 19 additions and 6 deletions
+6 -3
View File
@@ -86,9 +86,12 @@ class CocoClient:
self.user_id, self.user_pass = login_req.retrieve()
logging.info("Logged in to coco as %s" % self.nick)
post_login_req = PostLoginRequest(self.user_id, self.user_pass)
post_login_req.retrieve()
logging.info("Post login successful")
self.is_connected = True
if post_login_req.retrieve():
logging.info("Post login successful")
self.is_connected = True
else:
logging.info("Post login failed")
def pulse(self) -> List[AbstractResponse]:
pulse_req = PulseRequest(self.user_id, self.user_pass)
+2
View File
@@ -1,3 +1,4 @@
import logging
from urllib.request import Request, urlopen
from random import randint, choice, random
from string import ascii_uppercase
@@ -64,6 +65,7 @@ class PostLoginRequest(LoggedInRequest):
def _parse_response(self, response : str):
"""Checks if the post-login was successful"""
logging.debug(response)
return response.startswith("99556")