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 | 9348f13b70fee8de254c8898d2a7840c4286eac1 (patch) | |
tree | 5c505211646877e281cab87d79f77cacf399e7d5 /pkg_resources.py | |
parent | fd0d9ace552a4fce85abcc622bdec9dc27f8c57d (diff) | |
download | external_python_setuptools-9348f13b70fee8de254c8898d2a7840c4286eac1.tar.gz external_python_setuptools-9348f13b70fee8de254c8898d2a7840c4286eac1.tar.bz2 external_python_setuptools-9348f13b70fee8de254c8898d2a7840c4286eac1.zip |
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): """ |