diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-06-14 11:53:14 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-06-14 11:53:14 -0400 |
| commit | e09c084b8960d7d71ae46befa520184cea34b950 (patch) | |
| tree | effae1ae586a0ec85b02a1799059af1644c9abec /pkg_resources.py | |
| parent | 1bd503a5b8320fb5ebf72a367aaf368e6ed2b880 (diff) | |
| download | python-setuptools-bitbucket-e09c084b8960d7d71ae46befa520184cea34b950.tar.gz | |
Expose a method describing what it does, and alias that to 'call'.
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index 323b28c8..42153d36 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -1531,8 +1531,14 @@ empty_provider = EmptyProvider() class ZipManifests(dict): + """ + Memoized zipfile manifests. + """ - def __call__(self, path): + def load(self, path): + """ + Load a manifest at path or return a suitable manifest already loaded. + """ path = os.path.normpath(path) stat = os.stat(path) @@ -1540,6 +1546,7 @@ class ZipManifests(dict): self[path] = (stat.st_mtime, self.build_manifest(path)) return self[path][1] + __call__ = load def build_manifest(self, path): """ |
