Skip to content

Commit

Permalink
(MODPYTHON-143) Allow just '~' to be used as a directory in the module
Browse files Browse the repository at this point in the history
importer search path to refer to the handler root directory.
  • Loading branch information
grahamd committed Dec 3, 2006
1 parent 28ed604 commit 48e443f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/python/mod_python/importer.py
Expand Up @@ -199,7 +199,11 @@ def _find_module(module_name, path):

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:])
Expand Down Expand Up @@ -245,9 +249,7 @@ def import_module(module_name, autoreload=None, log=None, path=None):
# 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 = []

Expand Down

0 comments on commit 48e443f

Please sign in to comment.