mirror of
https://github.com/micropython/micropython.git
synced 2026-01-04 11:10:14 +01:00
py/objstr: Fix error type for badly formatted format specifier.
Was KeyError, should be ValueError.
This commit is contained in:
@@ -194,3 +194,8 @@ try:
|
||||
'{0:s}'.format(1)
|
||||
except ValueError:
|
||||
print('ValueError')
|
||||
|
||||
try:
|
||||
'{:*"1"}'.format('zz')
|
||||
except ValueError:
|
||||
print('ValueError')
|
||||
|
||||
Reference in New Issue
Block a user