[Distutils] patch: Unused import of 'shutil'
Ben Finney
ben at benfinney.id.au
Mon Oct 29 03:39:13 CET 2007
Howdy all,
As of version 0.6c7 (and likely earlier), 'ez_setup.py' causes
'pyflakes' to emit two warnings::
$ pyflakes ./ez_setup.py
./ez_setup.py:117: 'shutil' imported but unused
./ez_setup.py:181: redefinition of unused 'main' from line 179
The latter is due to 'pyflakes' not handling an ImportError-based
import fallback, as documented in ticket 1499 in the pyflakes Trac
<URL:http://divmod.org/trac/ticket/1499>.
The former is fixed with this patch:
--- ez_setup.py 2007-10-29 13:36:24.000000000 +1100
+++ ez_setup.py 2007-10-29 13:36:37.000000000 +1100
@@ -114,7 +114,7 @@
with a '/'). `to_dir` is the directory where the egg will be downloaded.
`delay` is the number of seconds to pause before an actual download attempt.
"""
- import urllib2, shutil
+ import urllib2
egg_name = "setuptools-%s-py%s.egg" % (version,sys.version[:3])
url = download_base + egg_name
saveto = os.path.join(to_dir, egg_name)
--
\ "Reichel's Law: A body on vacation tends to remain on vacation |
`\ unless acted upon by an outside force." -- Carol Reichel |
_o__) |
Ben Finney
More information about the Distutils-SIG
mailing list