diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2003-10-24 20:09:23 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2003-10-24 20:09:23 (GMT) |
commit | 23b44a39cec5ccebb6c6eb1e94eccbd6e8ce758e (patch) | |
tree | 941140dc41a2b2a6ab495fda2cbbd6df7409824a /Tools/versioncheck | |
parent | f8d59d28e0867c82b647d94c0aecd9e1c3accd9e (diff) | |
download | cpython-23b44a39cec5ccebb6c6eb1e94eccbd6e8ce758e.zip cpython-23b44a39cec5ccebb6c6eb1e94eccbd6e8ce758e.tar.gz cpython-23b44a39cec5ccebb6c6eb1e94eccbd6e8ce758e.tar.bz2 |
Patch #812378: Normalize white space.
Diffstat (limited to 'Tools/versioncheck')
-rw-r--r-- | Tools/versioncheck/_checkversion.py | 6 | ||||
-rw-r--r-- | Tools/versioncheck/checkversions.py | 52 | ||||
-rw-r--r-- | Tools/versioncheck/pyversioncheck.py | 11 |
3 files changed, 34 insertions, 35 deletions
diff --git a/Tools/versioncheck/_checkversion.py b/Tools/versioncheck/_checkversion.py index a103bf9..7b3bb50 100644 --- a/Tools/versioncheck/_checkversion.py +++ b/Tools/versioncheck/_checkversion.py @@ -9,8 +9,8 @@ _VERSION="1.0" _URL="http://www.cwi.nl/~jack/versioncheck/curversion.txt" try: - _myverbose=VERBOSE + _myverbose=VERBOSE except NameError: - _myverbose=1 - + _myverbose=1 + pyversioncheck.versioncheck(_PACKAGE, _URL, _VERSION, verbose=_myverbose) diff --git a/Tools/versioncheck/checkversions.py b/Tools/versioncheck/checkversions.py index dcc56d3..956f553 100644 --- a/Tools/versioncheck/checkversions.py +++ b/Tools/versioncheck/checkversions.py @@ -23,32 +23,32 @@ Values for verboselevel: 3 - Check every URL for packages with multiple locations""" def check1dir(dummy, dir, files): - if CHECKNAME in files: - fullname = os.path.join(dir, CHECKNAME) - try: - execfile(fullname) - except: - print '** Exception in', fullname - + if CHECKNAME in files: + fullname = os.path.join(dir, CHECKNAME) + try: + execfile(fullname) + except: + print '** Exception in', fullname + def walk1tree(tree): - os.path.walk(tree, check1dir, None) - + os.path.walk(tree, check1dir, None) + def main(): - global VERBOSE - try: - options, arguments = getopt.getopt(sys.argv[1:], 'v:') - except getopt.error: - print USAGE - sys.exit(1) - for o, a in options: - if o == '-v': - VERBOSE = int(a) - if not arguments: - arguments = [sys.prefix] - for dir in arguments: - walk1tree(dir) - + global VERBOSE + try: + options, arguments = getopt.getopt(sys.argv[1:], 'v:') + except getopt.error: + print USAGE + sys.exit(1) + for o, a in options: + if o == '-v': + VERBOSE = int(a) + if not arguments: + arguments = [sys.prefix] + for dir in arguments: + walk1tree(dir) + if __name__ == '__main__': - main() - - + main() + + diff --git a/Tools/versioncheck/pyversioncheck.py b/Tools/versioncheck/pyversioncheck.py index 51bdd68..6ac34c8 100644 --- a/Tools/versioncheck/pyversioncheck.py +++ b/Tools/versioncheck/pyversioncheck.py @@ -5,10 +5,10 @@ import urllib import sys # Verbose options -VERBOSE_SILENT=0 # Single-line reports per package -VERBOSE_NORMAL=1 # Single-line reports per package, more info if outdated -VERBOSE_EACHFILE=2 # Report on each URL checked -VERBOSE_CHECKALL=3 # Check each URL for each package +VERBOSE_SILENT=0 # Single-line reports per package +VERBOSE_NORMAL=1 # Single-line reports per package, more info if outdated +VERBOSE_EACHFILE=2 # Report on each URL checked +VERBOSE_CHECKALL=3 # Check each URL for each package # Test directory ## urllib bug: _TESTDIR="ftp://ftp.cwi.nl/pub/jack/python/versiontestdir/" @@ -96,5 +96,4 @@ def _test(): if __name__ == '__main__': _test() - - + |