Unverified Commit 3b39af12 authored by Henri Payno's avatar Henri Payno
Browse files

edf2nx: adapt to deprecation warning code by trying to import get_flats_url function first

parent 529bb888
......@@ -152,7 +152,11 @@ def edf_to_nx(
_edf_to_ignore.append("HST")
else:
_edf_to_ignore.remove("HST")
refs_urls = scan.get_refs_url(
try:
get_flats_url = scan.get_flats_url
except ImportError:
get_flats_url = scan.get_refs_url
refs_urls = get_flats_url(
scan_path=scan.path, prefix=refs_to_find, ignore=_edf_to_ignore
)
if len(refs_urls) > 0:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment