Skip to content
Snippets Groups Projects
Commit bd4f20b8 authored by Laurent Mercadier's avatar Laurent Mercadier
Browse files

Merge branch 'fix-no-bpt' into 'master'

Checks if single-version mnemonic is in all_sources

See merge request !163
parents edc4029d d000821d
No related branches found
No related tags found
Loading
......@@ -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'])):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment