Browse Source

Refactored error maps.

pull/2/head 1.1.3
Richard Neumann 4 years ago
parent
commit
81f73fe76d
  1. 3
      rcon/rconclt.py
  2. 3
      rcon/rconshell.py

3
rcon/rconclt.py

@ -20,8 +20,7 @@ __all__ = ['get_credentials', 'main']
ERRORS = ( ERRORS = (
(ConnectionRefusedError, 'Connection refused.', 3), (ConnectionRefusedError, 'Connection refused.', 3),
(timeout, 'Connection timeout.', 4), ((TimeoutError, timeout), 'Connection timeout.', 4),
(TimeoutError, 'Connection timeout.', 4),
(RequestIdMismatch, 'Unexpected request ID mismatch.', 5), (RequestIdMismatch, 'Unexpected request ID mismatch.', 5),
(WrongPassword, 'Wrong password.', 6) (WrongPassword, 'Wrong password.', 6)
) )

3
rcon/rconshell.py

@ -18,8 +18,7 @@ __all__ = ['get_args', 'main']
ERRORS = ( ERRORS = (
(ConnectionRefusedError, 'Connection refused.', 3), (ConnectionRefusedError, 'Connection refused.', 3),
(timeout, 'Connection timeout.', 4), ((TimeoutError, timeout), 'Connection timeout.', 4),
(TimeoutError, 'Connection timeout.', 4),
(RequestIdMismatch, 'Unexpected request ID mismatch.', 5) (RequestIdMismatch, 'Unexpected request ID mismatch.', 5)
) )
LOGGER = getLogger('rconshell') LOGGER = getLogger('rconshell')

Loading…
Cancel
Save