From: david-sarah Date: Fri, 21 Jan 2011 02:10:11 +0000 (-0800) Subject: Apply pyflakes to more files and fix the resulting warnings. X-Git-Tag: allmydata-tahoe-1.8.2b1~27 X-Git-Url: https://git.rkrishnan.org/specifications/components/com_hotproperty/%22doc.html/?a=commitdiff_plain;h=06e0d13451a1dd22c8a04dcfaeb60113c28ee6a0;p=tahoe-lafs%2Ftahoe-lafs.git Apply pyflakes to more files and fix the resulting warnings. --- diff --git a/Makefile b/Makefile index 8a133151..44c15fc6 100644 --- a/Makefile +++ b/Makefile @@ -180,7 +180,7 @@ endif pyflakes: - $(PYTHON) -OOu `which pyflakes` src/allmydata |sort |uniq + $(PYTHON) -OOu `which pyflakes` src/allmydata static misc/build_helpers bin/tahoe-script.template |sort |uniq check-umids: $(PYTHON) misc/coding_tools/check-umids.py `find src/allmydata -name '*.py'` diff --git a/misc/build_helpers/show-tool-versions.py b/misc/build_helpers/show-tool-versions.py index dedc3d98..9464c2c3 100644 --- a/misc/build_helpers/show-tool-versions.py +++ b/misc/build_helpers/show-tool-versions.py @@ -5,6 +5,7 @@ import locale, os, subprocess, sys, traceback added_zetuptoolz_egg = False try: import pkg_resources + pkg_resources # hush pyflakes except ImportError: import glob eggz = glob.glob('setuptools-*.egg') diff --git a/misc/build_helpers/test-with-fake-dists.py b/misc/build_helpers/test-with-fake-dists.py index 7814a57a..64d84539 100644 --- a/misc/build_helpers/test-with-fake-dists.py +++ b/misc/build_helpers/test-with-fake-dists.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -import StringIO, glob, os, platform, shutil, subprocess, sys, tarfile, zipfile +import StringIO, os, platform, shutil, subprocess, sys, tarfile, zipfile import pkg_resources def test(): diff --git a/misc/build_helpers/test_mac_diskimage.py b/misc/build_helpers/test_mac_diskimage.py index 7795dfd1..7b7aaecb 100644 --- a/misc/build_helpers/test_mac_diskimage.py +++ b/misc/build_helpers/test_mac_diskimage.py @@ -15,7 +15,7 @@ # allmydata-tahoe: 1.4.1-r3916 (/home/zooko/playground/allmydata/tahoe/trunk/trunk/src), foolscap: 0.4.1 (/usr/local/lib/python2.6/dist-packages/foolscap-0.4.1-py2.6.egg), pycryptopp: 0.5.10 (/home/zooko/playground/allmydata/tahoe/trunk/trunk/support/lib/python2.6/site-packages/pycryptopp-0.5.10-py2.6-linux-x86_64.egg), zfec: 1.4.2 (/usr/local/lib/python2.6/dist-packages/zfec-1.4.2-py2.6-linux-x86_64.egg), Twisted: 8.2.0-r26987 (/usr/local/lib/python2.6/dist-packages/Twisted-8.2.0_r26987-py2.6-linux-x86_64.egg), Nevow: 0.9.32 (/home/zooko/playground/allmydata/tahoe/trunk/trunk/support/lib/python2.6/site-packages/Nevow-0.9.32-py2.6.egg), zope.interface: 3.4.0 (/usr/lib/python2.6/dist-packages), python: 2.6.2 (/usr/bin/python), platform: Linux-Ubuntu_9.04-x86_64-64bit_ELF (None), sqlite: 3.6.10 (unknown), simplejson: 2.0.1 (/usr/local/lib/python2.6/dist-packages/simplejson-2.0.1-py2.6-linux-x86_64.egg), argparse: 0.8.0 (/usr/local/lib/python2.6/dist-packages/argparse-0.8.0-py2.6.egg), pyOpenSSL: 0.7 (/home/zooko/playground/allmydata/tahoe/trunk/trunk/support/lib/python2.6/site-packages/pyOpenSSL-0.7-py2.6-linux-x86_64.egg), pyutil: 1.3.30 (/usr/local/lib/python2.6/dist-packages/pyutil-1.3.30-py2.6.egg), zbase32: 1.1.1 (/usr/local/lib/python2.6/dist-packages/zbase32-1.1.1-py2.6.egg), setuptools: 0.6c12dev (/home/zooko/playground/allmydata/tahoe/trunk/trunk/support/lib/python2.6/site-packages/setuptools-0.6c12dev.egg), pysqlite: 2.4.1 (/usr/lib/python2.6/sqlite3) -import fcntl, os, re, subprocess, time +import os, re, subprocess, time def test_mac_diskimage(appname, version): """ Return True on success, raise exception on failure. """