Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tango
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue 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
LOFAR2.0
tango
Commits
813fc198
Commit
813fc198
authored
3 years ago
by
Jan David Mol
Browse files
Options
Downloads
Patches
Plain Diff
L2SS-544
: Remove guards against what is logically always False
parent
b749cdc8
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!199
L2SS-544: Improve LibConfiguration parsing, and return a dict instead of list...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tangostationcontrol/tangostationcontrol/toolkit/archiver.py
+4
-4
4 additions, 4 deletions
tangostationcontrol/tangostationcontrol/toolkit/archiver.py
with
4 additions
and
4 deletions
tangostationcontrol/tangostationcontrol/toolkit/archiver.py
+
4
−
4
View file @
813fc198
...
...
@@ -72,7 +72,7 @@ class Archiver():
raise
Exception
(
f
"
Configuration Manager
{
cm_name
}
is in FAULT state
"
)
except
Exception
as
e
:
raise
Exception
(
f
"
Connection failed with Configuration Manager
{
cm_name
}
"
)
from
e
self
.
es_list
=
[
es_name
for
es_name
in
self
.
get_subscribers
(
from_db
=
False
)]
or
[]
self
.
es_list
=
[
es_name
for
es_name
in
self
.
get_subscribers
(
from_db
=
False
)]
self
.
cm
.
write_attribute
(
'
Context
'
,
context
)
# Set default Context Archiving for all the subscribers
self
.
selector
=
Selector
()
if
selector_filename
is
None
else
Selector
(
selector_filename
)
# Create selector for customized strategies
try
:
...
...
@@ -383,7 +383,7 @@ class Archiver():
errs_dict
=
self
.
get_subscriber_errors
()
for
e
in
errs_dict
:
if
attribute_name
in
e
:
return
errs_dict
.
get
(
e
)
return
errs_dict
[
e
]
return
None
def
get_subscriber_load
(
self
,
use_freq
:
bool
=
True
,
es_name
:
str
=
None
):
...
...
@@ -422,7 +422,7 @@ class Archiver():
freq_dict
=
{
a
:
r
for
a
,
r
in
zip
(
es
.
AttributeList
,
es
.
AttributeRecordFreqList
)}
for
f
in
freq_dict
:
if
attribute_name
.
lower
()
in
f
:
return
freq_dict
.
get
(
f
,
0.
)
return
freq_dict
[
f
]
else
:
logger
.
warning
(
f
"
Attribute
{
attribute_name
}
not found!
"
)
...
...
@@ -436,7 +436,7 @@ class Archiver():
fail_dict
=
{
a
:
r
for
a
,
r
in
zip
(
es
.
AttributeList
,
es
.
AttributeFailureFreqList
)}
for
f
in
fail_dict
:
if
attribute_name
.
lower
()
in
f
:
return
fail_dict
.
get
(
f
,
0.
)
return
fail_dict
[
f
]
else
:
logger
.
warning
(
f
"
Attribute
{
attribute_name
}
not found!
"
)
...
...
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