From d37e3baf62805b91e8cbd7b169f66b2c9d7962e5 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Mon, 15 Aug 2011 08:29:08 +0000 Subject: [PATCH] Fixed #16523 -- Made path handling in autoreload code work on Jython. Thanks, Aymeric Augustin. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16619 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/autoreload.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/django/utils/autoreload.py b/django/utils/autoreload.py index ec7b103069..ffc60d4b14 100644 --- a/django/utils/autoreload.py +++ b/django/utils/autoreload.py @@ -57,6 +57,8 @@ def code_changed(): for filename in filter(lambda v: v, map(lambda m: getattr(m, "__file__", None), sys.modules.values())): if filename.endswith(".pyc") or filename.endswith(".pyo"): filename = filename[:-1] + if filename.endswith("$py.class"): + filename = filename[:-9] + ".py" if not os.path.exists(filename): continue # File might be in an egg, so it can't be reloaded. stat = os.stat(filename)