forked from M-Labs/artiq
1
0
Fork 0

management/file_import: invalidate linecache if needed

This commit is contained in:
Sebastien Bourdeauducq 2015-01-07 18:14:52 +08:00
parent c11708972d
commit b63b46786e
1 changed files with 3 additions and 0 deletions

View File

@ -1,7 +1,10 @@
import importlib.machinery import importlib.machinery
import linecache
def file_import(filename): def file_import(filename):
linecache.checkcache(filename)
modname = filename modname = filename
i = modname.rfind("/") i = modname.rfind("/")
if i > 0: if i > 0: