diff options
| author | Tarek Ziade <tarek@ziade.org> | 2010-04-05 22:59:48 +0200 |
|---|---|---|
| committer | Tarek Ziade <tarek@ziade.org> | 2010-04-05 22:59:48 +0200 |
| commit | 4da7cdd3ea61af90e56e0cbe63811b8ef13cd484 (patch) | |
| tree | bd46086184ee75acd0be4a3e28a48fccd566d06c /pkg_resources.py | |
| parent | c8f35c14f32aa8c074530413600386bf0bd8b55e (diff) | |
| download | python-setuptools-git-4da7cdd3ea61af90e56e0cbe63811b8ef13cd484.tar.gz | |
Removed spurious UserWarnings. Fixes #134
--HG--
branch : distribute
extra : rebase_source : be9d958a083e556228597d044267d7e15a826649
Diffstat (limited to 'pkg_resources.py')
| -rw-r--r-- | pkg_resources.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg_resources.py b/pkg_resources.py index f31789e9..6d96f5c2 100644 --- a/pkg_resources.py +++ b/pkg_resources.py @@ -2332,7 +2332,8 @@ class Distribution(object): if modname in ('pkg_resources', 'setuptools', 'site'): continue fn = getattr(sys.modules[modname], '__file__', None) - if fn and normalize_path(fn).startswith(loc): + if fn and (normalize_path(fn).startswith(loc) or + fn.startswith(self.location)): continue issue_warning( "Module %s was already imported from %s, but %s is being added" |
