

def _reload_on_update(modify_times):
    if _reload_attempted:
        return
    if (process.task_id() is not None):
        return
    for module in sys.modules.values():
        if (not isinstance(module, types.ModuleType)):
            continue
        path = getattr(module, '__file__', None)
        if (not path):
            continue
        if (path.endswith('.pyc') or path.endswith('.pyo')):
            path = path[:(- 1)]
        _check_file(modify_times, path)
    for path in _watched_files:
        _check_file(modify_times, path)

dataset/ETHPy150Open D-L/SimpleBookMarks/src/tornado/autoreload.py _reload_on_update/original