Fix import for data.
authorTim 'mithro' Ansell <me@mith.ro>
Sun, 23 Feb 2020 23:29:46 +0000 (15:29 -0800)
committerTim 'mithro' Ansell <me@mith.ro>
Sun, 12 Apr 2020 01:37:06 +0000 (18:37 -0700)
litex/data/find.py

index da7ed98196cb981cd7d57e37a73b69cebea71f46..1a143b1dc7ba117a6b5bd5173463ba4daaa19da0 100644 (file)
@@ -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("""\