testcrypt: fix malformatted error message.

I managed to get two format parameters reversed in the message when a
return type is unhandled.

(cherry picked from commit 9cf2db5f94)
This commit is contained in:
Simon Tatham 2020-01-06 19:58:01 +00:00
Родитель 9407aef704
Коммит 6f1f04839b
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -182,7 +182,7 @@ def make_retval(rettype, word, unpack_strings):
assert word == b"true" or word == b"false"
return word == b"true"
raise TypeError("Can't deal with return value {!r} of type {!r}"
.format(rettype, word))
.format(word, rettype))
def make_retvals(rettypes, retwords, unpack_strings=True):
assert len(rettypes) == len(retwords) # FIXME: better exception