From a34c0068f22d91aa705f3c584c81bba07a4d76bb Mon Sep 17 00:00:00 2001 From: Frederico Jordan Date: Mon, 5 Aug 2019 03:56:25 -0300 Subject: [PATCH] Catching exceptions --- progress.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/progress.py b/progress.py index 3aa4fdc..3f88c2c 100644 --- a/progress.py +++ b/progress.py @@ -25,13 +25,13 @@ def get_template_fields(progress): scale = 100 try: scale = int(request.args.get("scale")) - except ValueError: + except (TypeError, ValueError): pass progress_width = 60 if title else 90 try: progress_width = int(request.args.get("width")) - except ValueError: + except (TypeError, ValueError): pass return {