diff --git a/src/bot/message_handlers.py b/src/bot/message_handlers.py index db26995..e43f6ee 100644 --- a/src/bot/message_handlers.py +++ b/src/bot/message_handlers.py @@ -307,7 +307,7 @@ async def _add_account5( password=data["passwd"], ) - encrypted_account = encryption.other_accounts.encrypt( + encrypted_account = encryption.accounts.encrypt( account, text, ) @@ -393,7 +393,7 @@ async def _get_account3( ) account = database.get.get_account_info(engine, mes.from_user.id, name) - account = encryption.other_accounts.decrypt( + account = encryption.accounts.decrypt( account, text, ) @@ -541,7 +541,9 @@ async def _export2( tasks = [] for account in accounts: function = functools.partial( - encryption.other_accounts.decrypt, account, text + encryption.accounts.decrypt, + account, + text, ) tasks.append(loop.run_in_executor(pool, function)) accounts = await asyncio.gather(*tasks) @@ -649,7 +651,7 @@ async def _import3( if not check_account(account): failed.append(account.name) continue - account = encryption.other_accounts.encrypt( + account = encryption.accounts.encrypt( account, text, ) diff --git a/src/encryption/__init__.py b/src/encryption/__init__.py index 1ac808a..3874a69 100644 --- a/src/encryption/__init__.py +++ b/src/encryption/__init__.py @@ -1,3 +1,3 @@ -from . import master_pass, other_accounts +from . import accounts, master_pass -__all__ = ["master_pass", "other_accounts"] +__all__ = ["master_pass", "accounts"] diff --git a/src/encryption/other_accounts.py b/src/encryption/accounts.py similarity index 100% rename from src/encryption/other_accounts.py rename to src/encryption/accounts.py