From fba8c1ffb48ebd800a6bbdbb928060f09455076b Mon Sep 17 00:00:00 2001 From: "kuldeep.k@cisinlabs.com" Date: Mon, 6 Sep 2021 21:42:13 +0530 Subject: [PATCH] Fixed isort & updated exceptions --- src/l10n.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/l10n.py b/src/l10n.py index c982fc32..3b16f0b6 100644 --- a/src/l10n.py +++ b/src/l10n.py @@ -6,9 +6,10 @@ import re import sys import time -from bmconfigparser import BMConfigParser from six.moves import range +from bmconfigparser import BMConfigParser + logger = logging.getLogger('default') DEFAULT_ENCODING = 'ISO8859-1' @@ -101,7 +102,7 @@ def formatTimestamp(timestamp=None): if timestamp is not None and not isinstance(timestamp, int): try: timestamp = int(timestamp) - except: # noqa:E722 + except (ValueError, TypeError): timestamp = None # timestamp can't be less than 0.