summaryrefslogtreecommitdiff
path: root/paste/util
diff options
context:
space:
mode:
authorianb <devnull@localhost>2005-09-12 20:20:21 +0000
committerianb <devnull@localhost>2005-09-12 20:20:21 +0000
commit09195d14502b4ff96afe384db4fa7428d6869167 (patch)
tree09e330110014d222616e4f4694834ae1aef24051 /paste/util
parent40da05e56a52829cc0b44bd14846d42f3e0cd299 (diff)
downloadpaste-09195d14502b4ff96afe384db4fa7428d6869167.tar.gz
Find packages even when some directories are relative
Diffstat (limited to 'paste/util')
-rw-r--r--paste/util/findpackage.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/paste/util/findpackage.py b/paste/util/findpackage.py
index 1d12c58..68b5e8b 100644
--- a/paste/util/findpackage.py
+++ b/paste/util/findpackage.py
@@ -9,8 +9,9 @@ def find_package(dir):
Given a directory, finds the equivalent package name. If it
is directly in sys.path, returns ''.
"""
+ dir = os.path.abspath(dir)
orig_dir = dir
- path = sys.path
+ path = map(os.path.abspath, sys.path)
packages = []
last_dir = None
while 1: