2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-25 03:08:27 +08:00

Revert "tools/file_import: use python 3.4 importlib API"

This reverts commit 614a96a3d7.

Conflicts:
	artiq/tools.py
This commit is contained in:
Sebastien Bourdeauducq 2015-02-18 08:51:44 -07:00
parent e6d0fc2021
commit 3543dc30c7

View File

@ -1,5 +1,4 @@
from operator import itemgetter
import sys
import importlib.machinery
import linecache
import logging
@ -32,8 +31,7 @@ def file_import(filename):
sys.path.insert(0, path)
loader = importlib.machinery.SourceFileLoader(modname, filename)
module = type(sys)(modname)
loader.exec_module(module)
module = loader.load_module()
sys.path.remove(path)