mirror of
https://github.com/JockeTF/fimfarchive.git
synced 2024-11-22 05:17:59 +01:00
Add missing prefix to formatted strings
This commit is contained in:
parent
4a7b10f2a2
commit
cb58cfaa53
1 changed files with 5 additions and 5 deletions
|
@ -203,12 +203,12 @@ class FimfarchiveFetcher(Fetcher):
|
||||||
try:
|
try:
|
||||||
meta = json.loads(raw)
|
meta = json.loads(raw)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise StorySourceError("Malformed meta for {key}: {raw}") from e
|
raise StorySourceError(f"Malformed meta for {key}: {raw}") from e
|
||||||
|
|
||||||
actual = meta.get('id')
|
actual = meta.get('id')
|
||||||
|
|
||||||
if key != actual:
|
if key != actual:
|
||||||
raise StorySourceError("Invalid ID for {key}: {actual}")
|
raise StorySourceError(f"Invalid ID for {key}: {actual}")
|
||||||
|
|
||||||
self.paths[key] = PATH.search(meta)
|
self.paths[key] = PATH.search(meta)
|
||||||
|
|
||||||
|
@ -219,13 +219,13 @@ class FimfarchiveFetcher(Fetcher):
|
||||||
path = self.fetch_path(key)
|
path = self.fetch_path(key)
|
||||||
|
|
||||||
if not path:
|
if not path:
|
||||||
raise StorySourceError("Missing path attribute for {key}.")
|
raise StorySourceError(f"Missing path attribute for {key}.")
|
||||||
|
|
||||||
try:
|
try:
|
||||||
data = self.archive.read(path)
|
data = self.archive.read(path)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
raise StorySourceError("Missing file for {key}: {path}") from e
|
raise StorySourceError(f"Missing file for {key}: {path}") from e
|
||||||
except BadZipFile as e:
|
except BadZipFile as e:
|
||||||
raise StorySourceError("Corrupt file for {key}: {path}") from e
|
raise StorySourceError(f"Corrupt file for {key}: {path}") from e
|
||||||
|
|
||||||
return data
|
return data
|
||||||
|
|
Loading…
Reference in a new issue