Skip to content
Snippets Groups Projects
Verified Commit 025f8d5e authored by David Hoese's avatar David Hoese
Browse files

Fix a couple try/except pass cases

parent e945112a
No related branches found
No related tags found
No related merge requests found
[bandit] [bandit]
skips: B506 skips: B506
exclude: aossceilo/tests,aossceilo/nc.py exclude: aossceilo/tests,aossceilo/nc.py,aossceilo/message.py
...@@ -506,9 +506,8 @@ def hex_to_int( ...@@ -506,9 +506,8 @@ def hex_to_int(
def _get(fcn, v, d): def _get(fcn, v, d):
try: try:
return fcn(v) return fcn(v)
except: except (ValueError, TypeError):
pass return d
return d
def _float(v): def _float(v):
...@@ -592,8 +591,8 @@ def parse_backscatter( ...@@ -592,8 +591,8 @@ def parse_backscatter(
hval = line[idx : idx + 4] hval = line[idx : idx + 4]
try: try:
backscatter[bidx] = hex_to_int(hval) backscatter[bidx] = hex_to_int(hval)
except: except (TypeError, ValueError):
pass _log.error("Invalid hex value", exc_info=True)
bidx += 1 bidx += 1
return backscatter return backscatter
......
...@@ -4,9 +4,9 @@ import importlib.resources ...@@ -4,9 +4,9 @@ import importlib.resources
import os import os
import sys import sys
from calendar import timegm from calendar import timegm
from defusedxml.cElementTree import fromstring
import numpy import numpy
from defusedxml.cElementTree import fromstring
from netCDF4 import Dataset from netCDF4 import Dataset
from aossceilo.level_b1 import message from aossceilo.level_b1 import message
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment