Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

machine_to_omas use temp cache for wildcard load #277

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion omas/omas_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,11 +126,14 @@ def machine_to_omas(ods, machine, pulse, location, options={}, branch='', user_m
idm = (machine, branch)
failed_locations = {}
if location.endswith(".*"):
temp_cache = cache
if temp_cache is None:
temp_cache = {}
root = location.split(".*")[0]
for key in mappings:
if root in key and key not in ods:
try:
resolve_mapped(ods, machine, pulse, mappings, key, idm, options_with_defaults, branch, cache=cache)
resolve_mapped(ods, machine, pulse, mappings, key, idm, options_with_defaults, branch, cache=temp_cache)
except (TreeNODATA, MdsIpException) as e:
if hasattr(e, "eval2TDI"):
failed_locations[key] = e.eval2TDI
Expand Down
Loading