From: Tim 'mithro' Ansell Date: Sun, 23 Feb 2020 23:29:46 +0000 (-0800) Subject: Fix import for data. X-Git-Tag: 24jan2021_ls180~424^2~9 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c96d1e667277809891f0edffbf7c8ff0a3f38848;p=litex.git Fix import for data. --- diff --git a/litex/data/find.py b/litex/data/find.py index da7ed981..1a143b1d 100644 --- a/litex/data/find.py +++ b/litex/data/find.py @@ -1,7 +1,9 @@ def find_data(data_type, data_name): imp = "from litex.data.{} import {} as dm".format(data_type, data_name) try: - exec(imp) + l = {} + exec(imp, {}, l) + dm = l['dm'] return dm.data_location except ImportError as e: raise ImportError("""\