forked from M-Labs/artiq
1
0
Fork 0

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
1 changed files with 1 additions and 3 deletions

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)