Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
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
RadioObservatory
LOFAR
Commits
f36821b7
Commit
f36821b7
authored
6 years ago
by
Mattia Mancini
Browse files
Options
Downloads
Patches
Plain Diff
SW-300
: Fixing errors in mdb_loader.py
parent
c91bb544
No related branches found
No related tags found
2 merge requests
!89
Monitoring maintenance Epic branch merge
,
!1
Resolve OSB-13 "Monitoringmaintenance "
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCU/Maintenance/MDB_tools/cli/mdb_loader.py
+3
-3
3 additions, 3 deletions
LCU/Maintenance/MDB_tools/cli/mdb_loader.py
with
3 additions
and
3 deletions
LCU/Maintenance/MDB_tools/cli/mdb_loader.py
+
3
−
3
View file @
f36821b7
...
@@ -72,7 +72,7 @@ def is_station_test(content):
...
@@ -72,7 +72,7 @@ def is_station_test(content):
:return: True if the content refers to a station test
:return: True if the content refers to a station test
"""
"""
pattern
=
r
'
(?:\d{8})(?:\,.*)*
'
pattern
=
r
'
(?:\d{8})(?:\,.*)*
'
for
line
in
content
:
for
line
in
content
.
split
(
'
\n
'
)
:
if
line
is
''
:
if
line
is
''
:
continue
continue
if
not
re
.
match
(
pattern
,
line
):
if
not
re
.
match
(
pattern
,
line
):
...
@@ -87,7 +87,7 @@ def is_rtsm_test(content):
...
@@ -87,7 +87,7 @@ def is_rtsm_test(content):
:return: True if the content refers to a RTSM
:return: True if the content refers to a RTSM
"""
"""
pattern
=
r
'
(?:#\.*)|(?:[^0-9\,]*=.*)
'
pattern
=
r
'
(?:#\.*)|(?:[^0-9\,]*=.*)
'
for
line
in
content
:
for
line
in
content
.
split
(
'
\n
'
)
:
if
line
is
''
:
if
line
is
''
:
continue
continue
if
not
re
.
match
(
pattern
,
line
):
if
not
re
.
match
(
pattern
,
line
):
...
@@ -102,7 +102,7 @@ def send_stationtest_rtsm_content_to_address(address, content):
...
@@ -102,7 +102,7 @@ def send_stationtest_rtsm_content_to_address(address, content):
:param content: content of the API call
:param content: content of the API call
:return: True if the request was successful False otherwise
:return: True if the request was successful False otherwise
"""
"""
full_address
=
'
/
'
.
join
([
address
,
compose_api_url_for_given_test_type
(
content
)])
full_address
=
'
/
'
.
join
([
address
,
compose_api_url_for_given_test_type
(
content
[
'
content
'
]
)])
logging
.
info
(
'
performing request to address %s
'
,
full_address
)
logging
.
info
(
'
performing request to address %s
'
,
full_address
)
logging
.
debug
(
'
request content %s
'
,
content
)
logging
.
debug
(
'
request content %s
'
,
content
)
...
...
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