Ticket #16523: 16523.diff

File 16523.diff, 658 bytes (added by aaugustin, 4 years ago)
  • django/utils/autoreload.py

    diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py
    index ec7b103..ffc60d4 100644
    a b def code_changed(): 
    5757    for filename in filter(lambda v: v, map(lambda m: getattr(m, "__file__", None), sys.modules.values())):
    5858        if filename.endswith(".pyc") or filename.endswith(".pyo"):
    5959            filename = filename[:-1]
     60        if filename.endswith("$py.class"):
     61            filename = filename[:-9] + ".py"
    6062        if not os.path.exists(filename):
    6163            continue # File might be in an egg, so it can't be reloaded.
    6264        stat = os.stat(filename)
Back to Top