Browse Source

Added Request ID mismatch check to rconshell.

pull/2/head
Richard Neumann 4 years ago
parent
commit
c3144a6742
  1. 2
      rcon/rconclt.py
  2. 4
      rcon/rconshell.py

2
rcon/rconclt.py

@ -22,7 +22,7 @@ ERRORS = (
(ConnectionRefusedError, 'Connection refused.', 3), (ConnectionRefusedError, 'Connection refused.', 3),
(timeout, 'Connection timeout.', 4), (timeout, 'Connection timeout.', 4),
(RequestIdMismatch, 'Unexpected request ID mismatch.', 5), (RequestIdMismatch, 'Unexpected request ID mismatch.', 5),
(WrongPassword, 'Wrong password.', 6), (WrongPassword, 'Wrong password.', 6)
) )
LOGGER = getLogger('rconclt') LOGGER = getLogger('rconclt')

4
rcon/rconshell.py

@ -7,6 +7,7 @@ from socket import timeout
from sys import exit # pylint: disable=W0622 from sys import exit # pylint: disable=W0622
from rcon.errorhandler import ErrorHandler from rcon.errorhandler import ErrorHandler
from rcon.exceptions import RequestIdMismatch
from rcon.rconclt import get_credentials from rcon.rconclt import get_credentials
from rcon.config import CONFIG_FILE, LOG_FORMAT from rcon.config import CONFIG_FILE, LOG_FORMAT
from rcon.console import PROMPT, rconcmd from rcon.console import PROMPT, rconcmd
@ -16,7 +17,8 @@ __all__ = ['get_args', 'main']
ERRORS = ( ERRORS = (
(ConnectionRefusedError, 'Connection refused.', 3), (ConnectionRefusedError, 'Connection refused.', 3),
(timeout, 'Connection timeout.', 4) (timeout, 'Connection timeout.', 4),
(RequestIdMismatch, 'Unexpected request ID mismatch.', 5)
) )
LOGGER = getLogger('rconshell') LOGGER = getLogger('rconshell')

Loading…
Cancel
Save