From c96d1e667277809891f0edffbf7c8ff0a3f38848 Mon Sep 17 00:00:00 2001 From: Tim 'mithro' Ansell Date: Sun, 23 Feb 2020 15:29:46 -0800 Subject: [PATCH] Fix import for data. --- litex/data/find.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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("""\ -- 2.30.2