diff options
| author | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2012-12-29 06:23:09 +0100 |
|---|---|---|
| committer | Arfrever Frehtes Taifersar Arahesis <Arfrever.FTA@GMail.Com> | 2012-12-29 06:23:09 +0100 |
| commit | ff024205c6dbafe809e91d4b469a944a81f12a9a (patch) | |
| tree | 657eb221935d3d459fd392d3461a806a68217bf8 /setuptools/command/develop.py | |
| parent | 45b19ba069e4b58c448102456135f4fabf131c8b (diff) | |
| download | python-setuptools-bitbucket-ff024205c6dbafe809e91d4b469a944a81f12a9a.tar.gz | |
Fix some ResourceWarnings.
Diffstat (limited to 'setuptools/command/develop.py')
| -rwxr-xr-x | setuptools/command/develop.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/setuptools/command/develop.py b/setuptools/command/develop.py index 709e349c..1d500040 100755 --- a/setuptools/command/develop.py +++ b/setuptools/command/develop.py @@ -132,7 +132,9 @@ class develop(easy_install): def uninstall_link(self): if os.path.exists(self.egg_link): log.info("Removing %s (link to %s)", self.egg_link, self.egg_base) - contents = [line.rstrip() for line in open(self.egg_link)] + egg_link_file = open(self.egg_link) + contents = [line.rstrip() for line in egg_link_file] + egg_link_file.close() if contents not in ([self.egg_path], [self.egg_path, self.setup_path]): log.warn("Link points to %s: uninstall aborted", contents) return |
