mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-09 09:22:03 +00:00
Make traceback of "value for <key> not passed" little bit smaller
This commit is contained in:
parent
a09f625667
commit
30a50b4527
1 changed files with 2 additions and 2 deletions
|
|
@ -58,9 +58,9 @@ class CallbackData:
|
|||
for part in self._part_names:
|
||||
value = kwargs.pop(part, None)
|
||||
if not value:
|
||||
try:
|
||||
if args:
|
||||
value = args.pop(0)
|
||||
except IndexError:
|
||||
else:
|
||||
raise ValueError(f"Value for '{part}' is not passed!")
|
||||
|
||||
if not isinstance(value, str):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue