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 2006/12/03 10:14:09 UTC

svn commit: r481741 - /httpd/mod_python/trunk/lib/python/mod_python/importer.py

Author: grahamd
Date: Sun Dec  3 01:14:06 2006
New Revision: 481741

URL: http://svn.apache.org/viewvc?view=rev&rev=481741
Log:
(MODPYTHON-143) Allow just '~' to be used as a directory in the module
importer search path to refer to the handler root directory.


Modified:
    httpd/mod_python/trunk/lib/python/mod_python/importer.py

Modified: httpd/mod_python/trunk/lib/python/mod_python/importer.py
URL: http://svn.apache.org/viewvc/httpd/mod_python/trunk/lib/python/mod_python/importer.py?view=diff&rev=481741&r1=481740&r2=481741
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/importer.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/importer.py Sun Dec  3 01:14:06 2006
@@ -199,7 +199,11 @@
 
     for directory in path:
         if directory is not None:
-            if directory[:2] == '~/':
+            if directory == '~':
+                root = get_handler_root()
+                if root is not None:
+                    directory = root
+            elif directory[:2] == '~/':
                 root = get_handler_root()
                 if root is not None:
                     directory = os.path.join(root, directory[2:])
@@ -245,9 +249,7 @@
         # that need to be searched for a module code
         # file. These directories will be, the directory
         # of the parent if also imported using this
-        # importer and any specified search path. When
-        # enabled, the handler root directory will also
-        # be searched.
+        # importer and any specified search path.
 
         search_path = []