Skip to content

Commit

Permalink
Actually use return value of ModelLoader._fail
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed May 12, 2024
1 parent 1c0a94a commit e024a5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/hexdoc/graphics/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def render_model(self, model_id: ResourceLocation):
exc_info=True,
)

self._fail(f"All strategies failed to render model: {model_id}")
return self._fail(f"All strategies failed to render model: {model_id}")

def render_texture(self, texture_id: ResourceLocation) -> URL | None:
if result := self._texture_cache.get(texture_id):
Expand All @@ -91,7 +91,7 @@ def render_texture(self, texture_id: ResourceLocation) -> URL | None:
+ " (this should never happen)"
)

self._fail(f"Failed to find texture: {texture_id}")
return self._fail(f"Failed to find texture: {texture_id}")

def _fail(self, message: str):
if self.props.textures.strict:
Expand Down

0 comments on commit e024a5e

Please sign in to comment.