You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by gr...@apache.org on 2003/09/03 21:56:29 UTC
cvs commit: httpd-python/lib/python/mod_python apache.py
grisha 2003/09/03 12:56:29
Modified: lib/python/mod_python apache.py
Log:
Instead of raising NOT_FOUND, make import_module attempt to reload
the module, when a module is already imported, but the path doesn't
match.
Submitted by: Ron Alford
Revision Changes Path
1.76 +5 -4 httpd-python/lib/python/mod_python/apache.py
Index: apache.py
===================================================================
RCS file: /home/cvs/httpd-python/lib/python/mod_python/apache.py,v
retrieving revision 1.75
retrieving revision 1.76
diff -u -r1.75 -r1.76
--- apache.py 26 Aug 2003 01:56:39 -0000 1.75
+++ apache.py 3 Sep 2003 19:56:29 -0000 1.76
@@ -470,9 +470,10 @@
if (not file or path and not
filter(lambda a: os.path.dirname(file).find(a) == 0, path)):
- raise SERVER_RETURN, HTTP_NOT_FOUND
-
- if autoreload:
+ # there is a script by this name already imported, but it's in
+ # a different directory, therefore it's a different script
+ mtime, oldtime = 0, -1
+ elif:
oldmtime = module.__dict__.get("__mtime__", 0)
mtime = module_mtime(module)
else: