[bitcoin/bitcoin] [devtools translations] catch invalid specifiers (#13472)

HashUnlimited commented on this pull request.

> @@ -52,6 +52,10 @@ def find_format_specifiers(s):
percent = s.find(‘%’, pos)
if percent < 0: break + try: + specifiers.append(s[percent+1]) + except: While sharing the vision of aiming for perfectionism, a proper "validation" of specifiers might be difficult, if going for more than a simple notification then I would also try to cover possible cases where the input data can be misinterpreted by missing a trailing space. I will think about a better while still easy solution and update the PR.

Добавить комментарий