From 50df953770409dc9c9558c77bd5c0bbb17ac54f6 Mon Sep 17 00:00:00 2001 From: Chris McDonough Date: Fri, 28 Aug 2009 17:15:00 +0000 Subject: Coverage. --- repoze/bfg/static.py | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'repoze/bfg/static.py') 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, -- cgit v1.2.3