Rename rpc_n_errors dictionary to rpc_errors_n_all

This commit is contained in:
Lonami Exo 2017-06-24 18:10:05 +02:00
parent 20956b23d1
commit 459e988ff5
5 changed files with 8 additions and 8 deletions

View File

@ -18,10 +18,10 @@ from .rpc_errors_420 import *
def rpc_message_to_error(code, message):
errors = {
303: rpc_303_errors,
400: rpc_400_errors,
401: rpc_401_errors,
420: rpc_420_errors
303: rpc_errors_303_all,
400: rpc_errors_400_all,
401: rpc_errors_401_all,
420: rpc_errors_420_all
}.get(code, None)
if errors is not None:

View File

@ -43,7 +43,7 @@ class UserMigrateError(InvalidDCError):
)
rpc_303_errors = {
rpc_errors_303_all = {
'FILE_MIGRATE_(\d+)': FileMigrateError,
'PHONE_MIGRATE_(\d+)': PhoneMigrateError,
'NETWORK_MIGRATE_(\d+)': NetworkMigrateError,

View File

@ -321,7 +321,7 @@ class UserIdInvalidError(BadRequestError):
)
rpc_400_errors = {
rpc_errors_400_all = {
'API_ID_INVALID': ApiIdInvalidError,
'BOT_METHOD_INVALID': BotMethodInvalidError,
'CHANNEL_INVALID': ChannelInvalidError,

View File

@ -84,7 +84,7 @@ class UserDeactivatedError(UnauthorizedError):
)
rpc_401_errors = {
rpc_errors_401_all = {
'ACTIVE_USER_REQUIRED': ActiveUserRequiredError,
'AUTH_KEY_INVALID': AuthKeyInvalidError,
'AUTH_KEY_PERM_EMPTY': AuthKeyPermEmptyError,

View File

@ -11,6 +11,6 @@ class FloodWaitError(FloodError):
)
rpc_420_errors = {
rpc_errors_420_all = {
'FLOOD_WAIT_(\d+)': FloodWaitError
}