From 376f30d709127e9858d3c0e0509473da78eedd2c Mon Sep 17 00:00:00 2001 From: iaacornus Date: Mon, 6 Jun 2022 22:34:25 +0800 Subject: [PATCH] specified exceptions --- main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 9270177..f3ba98f 100644 --- a/main.py +++ b/main.py @@ -56,7 +56,11 @@ def main(subreddit_=None, background=None, filename=None, thread_link_=None): try: float(os.getenv("OPACITY")) - except: + except ( + ValueError, + FloatingPointError, + TypeError, + ): console.print( f"[bold red]Please ensure that OPACITY is between 0 and 1 in .env file.[/bold red]" )