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 linecache
def file_import(filename):
linecache.checkcache(filename)
modname = filename
i = modname.rfind("/")
if i > 0: