Add missing prefix to formatted strings

This commit is contained in:
Joakim Soderlund 2018-02-14 09:28:35 +01:00
parent 4a7b10f2a2
commit cb58cfaa53

View file

@ -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