From 06e0d13451a1dd22c8a04dcfaeb60113c28ee6a0 Mon Sep 17 00:00:00 2001 From: david-sarah Date: Thu, 20 Jan 2011 18:10:11 -0800 Subject: [PATCH] Apply pyflakes to more files and fix the resulting warnings. --- Makefile | 2 +- misc/build_helpers/show-tool-versions.py | 1 + misc/build_helpers/test-with-fake-dists.py | 2 +- misc/build_helpers/test_mac_diskimage.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) 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. """ -- 2.37.2