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

Merge branch 'fix-menmonics' into 'master'

Only check keys if menmonic has more than one version

Closes #36

See merge request !159
parents 1a6ac185 ae724d3c
No related branches found
No related tags found
1 merge request!159Only check keys if menmonic has more than one version
......@@ -10,6 +10,7 @@ import logging
from .constants import mnemonics as _mnemonics
from extra_data import open_run
from numpy import s_
__all__ = [
'mnemonics_for_run'
]
......@@ -72,6 +73,8 @@ def mnemo_version_index(run, mnemonic):
The index of the tuple. If no valid version is found, returns -1.
"""
if len(_mnemonics[mnemonic]) == 1:
return 0
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