mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-25 22:47:59 +01:00
Fix string formatting type warning
This commit is contained in:
parent
271fa3cf96
commit
c2a62dac38
1 changed files with 2 additions and 2 deletions
|
@ -110,14 +110,14 @@ class Index(Mapping[int, Dict[str, Any]]):
|
|||
return -1, f"Unknown parser error: {e}".encode()
|
||||
|
||||
if meta[0] != 123 or meta[-1] != 125:
|
||||
return -1, f"Malformed JSON object for {key}.".encode()
|
||||
return -1, f"Malformed JSON object for {key!r}.".encode()
|
||||
|
||||
try:
|
||||
return int(key), serialize(json.loads(meta.decode()))
|
||||
except UnicodeDecodeError as e:
|
||||
return -1, f"Incorrectly encoded index: {e}".encode()
|
||||
except ValueError as e:
|
||||
return -1, f"Malformed meta for {key}: {e}".encode()
|
||||
return -1, f"Malformed meta for {key!r}: {e}".encode()
|
||||
|
||||
|
||||
class MemoryIndex(Index):
|
||||
|
|
Loading…
Reference in a new issue