parent
85712a5355
commit
bbabfdccce
|
@ -56,8 +56,13 @@ _error_files = []
|
||||||
|
|
||||||
def code_changed():
|
def code_changed():
|
||||||
global _mtimes, _win
|
global _mtimes, _win
|
||||||
filenames = [getattr(m, "__file__", None) for m in sys.modules.values()]
|
filenames = []
|
||||||
for filename in filter(None, filenames) + _error_files:
|
for m in sys.modules.values():
|
||||||
|
try:
|
||||||
|
filenames.append(m.__file__)
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
|
for filename in filenames + _error_files:
|
||||||
if filename.endswith(".pyc") or filename.endswith(".pyo"):
|
if filename.endswith(".pyc") or filename.endswith(".pyo"):
|
||||||
filename = filename[:-1]
|
filename = filename[:-1]
|
||||||
if filename.endswith("$py.class"):
|
if filename.endswith("$py.class"):
|
||||||
|
|
Loading…
Reference in New Issue