Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

only do actions if try succeeded (#3694)

adeshpande902c3f42151a
diff --git a/manim/cli/render/commands.py b/manim/cli/render/commands.py
index 3ad340ed5..37e8ffb6b 100644
--- a/manim/cli/render/commands.py
+++ b/manim/cli/render/commands.py
@@ -142,14 +142,14 @@ def render(
)
except Exception:
logger.debug("Something went wrong: %s", warn_prompt)
-
- stable = json_data["info"]["version"]
- if stable != __version__:
- console.print(
- f"You are using manim version [red]v{__version__}[/red], but version [green]v{stable}[/green] is available.",
- )
- console.print(
- "You should consider upgrading via [yellow]pip install -U manim[/yellow]",
- )
+ else:
+ stable = json_data["info"]["version"]
+ if stable != __version__:
+ console.print(
+ f"You are using manim version [red]v{__version__}[/red], but version [green]v{stable}[/green] is available.",
+ )
+ console.print(
+ "You should consider upgrading via [yellow]pip install -U manim[/yellow]",
+ )
return args