Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Bliss
bliss
Commits
8598bcc3
Commit
8598bcc3
authored
May 21, 2021
by
Wout De Nolf
Browse files
MultiplePositions: keep compatibility with old configuration files with deprecation warning
parent
b3790a7d
Changes
1
Hide whitespace changes
Inline
Side-by-side
bliss/controllers/multiplepositions.py
View file @
8598bcc3
...
...
@@ -72,6 +72,7 @@ Example YAML_ configuration:
tolerance: 0.2
"""
import
functools
import
warnings
from
tabulate
import
tabulate
from
gevent
import
Timeout
...
...
@@ -119,7 +120,15 @@ class MultiplePositions(HasMetadataForDataset, NonScannableHasMetadataForScan):
return
self
.
_get_position_config
().
get
(
"dataset_metadata"
,
dict
())
def
scan_metadata
(
self
):
return
self
.
_get_position_config
().
get
(
"scan_metadata"
,
dict
())
cfg
=
self
.
_get_position_config
()
mdata
=
cfg
.
get
(
"metadata"
,
None
)
if
mdata
:
warnings
.
warn
(
"The MultiplePositions configuration tag 'metadata' is deprecated and needs to be split in 'scan_metadata' and 'dataset_metadata'."
,
FutureWarning
,
)
return
mdata
return
cfg
.
get
(
"scan_metadata"
,
dict
())
@
property
def
scan_metadata_name
(
self
):
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment