Ajout d'un peu de debugennww
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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")
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user