diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-09 13:19:29 -0500 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2014-02-09 13:19:29 -0500 |
| commit | e8e9a565526ac00b508da4717e9ae1f548083ae0 (patch) | |
| tree | 1cc7b2a3e9ec5bf05b1e84b642c827780a500309 /pkg_resources.py | |
| parent | 69eb2865b8fae0760f9cb62d099ec7e92a908672 (diff) | |
| download | python-setuptools-git-e8e9a565526ac00b508da4717e9ae1f548083ae0.tar.gz | |
More succinctly implement declare_state.
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index bde30989..73225e69 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -90,10 +90,8 @@ def _bypass_ensure_directory(name, mode=0x1FF): # 0777 _state_vars = {} def _declare_state(vartype, **kw): - g = globals() - for name, val in kw.items(): - g[name] = val - _state_vars[name] = vartype + globals().update(kw) + _state_vars.update(dict.from_keys(kw, vartype)) def __getstate__(): state = {} @@ -2339,6 +2337,8 @@ class Distribution(object): def insert_on(self, path, loc = None): """Insert self.location in path before its nearest parent directory""" + if 'foo' in path: + import pdb; pdb.set_trace() loc = loc or self.location if not loc: return |
