Fixed isort & updated exceptions
This commit is contained in:
parent
82c2501ab7
commit
fba8c1ffb4
|
@ -6,9 +6,10 @@ import re
|
||||||
import sys
|
import sys
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from bmconfigparser import BMConfigParser
|
|
||||||
from six.moves import range
|
from six.moves import range
|
||||||
|
|
||||||
|
from bmconfigparser import BMConfigParser
|
||||||
|
|
||||||
logger = logging.getLogger('default')
|
logger = logging.getLogger('default')
|
||||||
|
|
||||||
DEFAULT_ENCODING = 'ISO8859-1'
|
DEFAULT_ENCODING = 'ISO8859-1'
|
||||||
|
@ -101,7 +102,7 @@ def formatTimestamp(timestamp=None):
|
||||||
if timestamp is not None and not isinstance(timestamp, int):
|
if timestamp is not None and not isinstance(timestamp, int):
|
||||||
try:
|
try:
|
||||||
timestamp = int(timestamp)
|
timestamp = int(timestamp)
|
||||||
except: # noqa:E722
|
except (ValueError, TypeError):
|
||||||
timestamp = None
|
timestamp = None
|
||||||
|
|
||||||
# timestamp can't be less than 0.
|
# timestamp can't be less than 0.
|
||||||
|
|
Reference in New Issue
Block a user