def _send_login(self):
login_str = "<STR_LIT>"<EOL>login_str = login_str.format(<EOL>self.callsign,<EOL>self.passwd,<EOL>("<STR_LIT>" + self.filter) if self.filter != "<STR_LIT>" else "<STR_LIT>",<EOL>__version__<EOL>)<EOL>self.logger.info("<STR_LIT>")<EOL>try:<EOL><INDENT>self._sendall(login_str)<EOL>self.sock.settimeout(<NUM_LIT:5>)<EOL>test = self.sock.recv(len(login_str) + <NUM_LIT:100>)<EOL>if is_py3:<EOL><INDENT>test = test.decode('<STR_LIT>')<EOL><DEDENT>test = test.rstrip()<EOL>self.logger.debug("<STR_LIT>", test)<EOL>_, _, callsign, status, _ = test.split('<STR_LIT:U+0020>', <NUM_LIT:4>)<EOL>if callsign == "<STR_LIT>":<EOL><INDENT>raise LoginError("<STR_LIT>")<EOL><DEDENT>if callsign != self.callsign:<EOL><INDENT>raise LoginError("<STR_LIT>" % test)<EOL><DEDENT>if status != "<STR_LIT>" and self.passwd != "<STR_LIT>":<EOL><INDENT>raise LoginError("<STR_LIT>")<EOL><DEDENT>if self.passwd == "<STR_LIT>":<EOL><INDENT>self.logger.info("<STR_LIT>")<EOL><DEDENT>else:<EOL><INDENT>self.logger.info("<STR_LIT>")<EOL><DEDENT><DEDENT>except LoginError as e:<EOL><INDENT>self.logger.error(str(e))<EOL>self.close()<EOL>raise<EOL><DEDENT>except:<EOL><INDENT>self.close()<EOL>self.logger.error("<STR_LIT>")<EOL>raise LoginError("<STR_LIT>")<EOL><DEDENT>
Sends login string to server