Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
AossCeilo
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container registry
Model registry
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
MetObs
AossCeilo
Commits
025f8d5e
Verified
Commit
025f8d5e
authored
11 months ago
by
David Hoese
Browse files
Options
Downloads
Patches
Plain Diff
Fix a couple try/except pass cases
parent
e945112a
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.bandit
+1
-1
1 addition, 1 deletion
.bandit
aossceilo/level_b1/message.py
+4
-5
4 additions, 5 deletions
aossceilo/level_b1/message.py
aossceilo/level_b1/nc.py
+1
-1
1 addition, 1 deletion
aossceilo/level_b1/nc.py
with
6 additions
and
7 deletions
.bandit
+
1
−
1
View file @
025f8d5e
[bandit]
[bandit]
skips: B506
skips: B506
exclude: aossceilo/tests,aossceilo/nc.py
exclude: aossceilo/tests,aossceilo/nc.py
,aossceilo/message.py
This diff is collapsed.
Click to expand it.
aossceilo/level_b1/message.py
+
4
−
5
View file @
025f8d5e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
aossceilo/level_b1/nc.py
+
1
−
1
View file @
025f8d5e
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment