exp is now exc

This commit is contained in:
2023-08-16 13:27:23 +02:00
parent 5e8506cc12
commit 1d88076285
6 changed files with 37 additions and 37 deletions

View File

@@ -123,16 +123,16 @@ async def cmd_import(app: PyroClient, msg: Message):
for name in handle.namelist()
]
_ = await asyncio.gather(*tasks)
except Exception as exp:
except Exception as exc:
logger.error(
"Could not import '%s' due to %s: %s",
answer.document.file_name,
exp,
exc,
format_exc(),
)
await answer.reply_text(
app._("import_unpack_error", "message", locale=user.locale).format(
exp, format_exc()
exc, format_exc()
)
)
return
@@ -165,12 +165,12 @@ async def cmd_import(app: PyroClient, msg: Message):
compress=False,
caption="queue",
)
except UnexpectedStatus as exp:
except UnexpectedStatus as exc:
logger.error(
"Could not upload '%s' from '%s': %s",
filename,
Path(f"{app.config['locations']['tmp']}/{tmp_dir}"),
exp,
exc,
)
await msg.reply_text(
app._(