Archived
1
0
Fork 0
This commit is contained in:
多羅狼 2023-04-19 12:47:02 +08:00 committed by GitHub
parent 8d1330c205
commit 40e167d4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -37,10 +37,8 @@ async def _(msg: Bot.MessageSession):
# error_type = data['error-type']
# raise NoReportException(f"{error_type}")
amount = None
while amount is None:
amount = float(msg.parsed_msg['<amount>'])
try:
amount = float(msg.parsed_msg['<amount>'])
if amount <= 0:
await msg.finish(msg.locale.t('exchange_rate.message.error.non_positive'))
except ValueError: