Skip to content
Snippets Groups Projects

Checks if single-version mnemonic is in all_sources

Merged Laurent Mercadier requested to merge fix-no-bpt into master
1 file
+ 3
2
Compare changes
  • Side-by-side
  • Inline
@@ -10,7 +10,6 @@ import logging
from .constants import mnemonics as _mnemonics
from extra_data import open_run
from numpy import s_
__all__ = [
'mnemonics_for_run'
]
@@ -74,7 +73,9 @@ def mnemo_version_index(run, mnemonic):
"""
if len(_mnemonics[mnemonic]) == 1:
return 0
if _mnemonics[mnemonic][0]['source'] in run.all_sources:
return 0
return -1
for i, v in enumerate(_mnemonics[mnemonic]):
if (v['source'] in run.all_sources and
v['key'] in run.keys_for_source(v['source'])):
Loading