mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
Patch #812378: Normalize white space.
This commit is contained in:
parent
f8d59d28e0
commit
23b44a39ce
10 changed files with 203 additions and 204 deletions
|
@ -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)
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
||||
|
|
|
@ -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()
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue