From eb7ca5eb60f12ff17e580e3777db492c2a64815f Mon Sep 17 00:00:00 2001 From: Julen Landa Alustiza Date: Nov 15 2019 11:00:31 +0000 Subject: pagure/api/user: capture ValueError exception on arrow.get() --- diff --git a/pagure/api/user.py b/pagure/api/user.py index 68ea6cc..1d3ee30 100644 --- a/pagure/api/user.py +++ b/pagure/api/user.py @@ -636,7 +636,7 @@ def api_view_user_activity_stats(username): try: return arrow.get(d, tz).replace(hour=12).timestamp - except arrow.parser.ParserError: + except (arrow.parser.ParserError, ValueError): # if tz is invalid for some reason, just go with UTC return arrow.get(d).replace(hour=12).timestamp else: