diff options
| author | Chris McDonough <chrism@agendaless.com> | 2009-08-28 17:15:00 +0000 |
|---|---|---|
| committer | Chris McDonough <chrism@agendaless.com> | 2009-08-28 17:15:00 +0000 |
| commit | 50df953770409dc9c9558c77bd5c0bbb17ac54f6 (patch) | |
| tree | 327045a06d056ae3c734fe4368bef30c1b449f83 /repoze/bfg/static.py | |
| parent | 399d18a10e14a9748fbdf23763dbddd18bdda812 (diff) | |
| download | pyramid-50df953770409dc9c9558c77bd5c0bbb17ac54f6.tar.gz pyramid-50df953770409dc9c9558c77bd5c0bbb17ac54f6.tar.bz2 pyramid-50df953770409dc9c9558c77bd5c0bbb17ac54f6.zip | |
Coverage.
Diffstat (limited to 'repoze/bfg/static.py')
| -rw-r--r-- | repoze/bfg/static.py | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/repoze/bfg/static.py b/repoze/bfg/static.py index be33ebee1..01ce98a30 100644 --- a/repoze/bfg/static.py +++ b/repoze/bfg/static.py @@ -1,5 +1,4 @@ import os -import sys import pkg_resources from paste.httpheaders import ETAG @@ -7,26 +6,6 @@ from paste.urlparser import StaticURLParser from paste import httpexceptions from paste import request -def find_package(path): - """ - Determine the Python-package where path is located. If the path - is not located within the Python sys-path, return ``None``. - """ - - syspaths = list(sys.path) - syspaths.sort(key=lambda syspath: path.startswith('path') and 'path', reverse=True) - syspath = syspaths[0] - - path = os.path.normpath(path) - if not path.startswith(syspath): - return - - path = path[len(syspath):] - if path.startswith(os.path.sep): - path = path[1:] - - return path - class PackageURLParser(StaticURLParser): """ This probably won't work with zipimported resources """ def __init__(self, package_name, resource_name, root_resource=None, |
