Skip to content

Commit

Permalink
Fixed #16523 -- Made path handling in autoreload code work on Jython.…
Browse files Browse the repository at this point in the history
… Thanks, Aymeric Augustin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16619 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information
jezdez committed Aug 15, 2011
1 parent a8e48dd commit d128178
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions django/utils/autoreload.py
Expand Up @@ -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)
Expand Down

0 comments on commit d128178

Please sign in to comment.