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/10/29 10:27:27 UTC
svn commit: r468856 -
/httpd/mod_python/trunk/lib/python/mod_python/importer.py
Author: grahamd
Date: Sun Oct 29 01:27:27 2006
New Revision: 468856
URL: http://svn.apache.org/viewvc?view=rev&rev=468856
Log:
(MODPYTHON-143) Allow '~/' shortcut to be used in paths listed in the
'mod_python.importer.path' option. This means that paths can be specified
with respect to handler root rather than using absolute paths in Apache
configuration files.
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=468856&r1=468855&r2=468856
==============================================================================
--- httpd/mod_python/trunk/lib/python/mod_python/importer.py (original)
+++ httpd/mod_python/trunk/lib/python/mod_python/importer.py Sun Oct 29 01:27:27 2006
@@ -197,6 +197,10 @@
for directory in path:
if directory is not None:
+ if directory[:2] == '~/':
+ root = get_handler_root()
+ if root is not None:
+ directory = os.path.join(root, directory[2:])
file = os.path.join(directory, module_name) + '.py'
if os.path.exists(file):
return file