Commit 462bfbfa authored by Tim Peters's avatar Tim Peters

Whitespace normalization.

parent 31e173cb
......@@ -133,7 +133,7 @@ class upload(Command):
schema, netloc, url, params, query, fragments = \
urlparse.urlparse(self.repository)
assert not params and not query and not fragments
if schema == 'http':
if schema == 'http':
http = httplib.HTTPConnection(netloc)
elif schema == 'https':
http = httplib.HTTPSConnection(netloc)
......@@ -145,7 +145,7 @@ class upload(Command):
try:
http.connect()
http.putrequest("POST", url)
http.putheader('Content-type',
http.putheader('Content-type',
'multipart/form-data; boundary=%s'%boundary)
http.putheader('Content-length', str(len(body)))
http.putheader('Authorization', auth)
......@@ -157,11 +157,10 @@ class upload(Command):
r = http.getresponse()
if r.status == 200:
self.announce('Server response (%s): %s' % (r.status, r.reason),
self.announce('Server response (%s): %s' % (r.status, r.reason),
log.INFO)
else:
self.announce('Upload failed (%s): %s' % (r.status, r.reason),
self.announce('Upload failed (%s): %s' % (r.status, r.reason),
log.ERROR)
if self.show_response:
print '-'*75, r.read(), '-'*75
......@@ -175,7 +175,7 @@ class MetadataTestCase(unittest.TestCase):
{"name": "package",
"version": "1.0",
"obsoletes": ["my.pkg (splat)"]})
def format_metadata(self, dist):
sio = StringIO.StringIO()
dist.metadata.write_pkg_file(sio)
......
......@@ -6,4 +6,4 @@ import distutils.versionpredicate
import doctest
def test_suite():
return doctest.DocTestSuite(distutils.versionpredicate)
return doctest.DocTestSuite(distutils.versionpredicate)
......@@ -101,10 +101,10 @@ class VersionPredicate:
versionPredicateStr = versionPredicateStr.strip()
if not versionPredicateStr:
raise ValueError("empty package restriction")
raise ValueError("empty package restriction")
match = re_validPackage.match(versionPredicateStr)
if not match:
raise ValueError("bad package name in %r" % versionPredicateStr)
raise ValueError("bad package name in %r" % versionPredicateStr)
self.name, paren = match.groups()
paren = paren.strip()
if paren:
......@@ -114,7 +114,7 @@ class VersionPredicate:
str = match.groups()[0]
self.pred = [splitUp(aPred) for aPred in str.split(",")]
if not self.pred:
raise ValueError("empty parenthesized list in %r"
raise ValueError("empty parenthesized list in %r"
% versionPredicateStr)
else:
self.pred = []
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment