diff options
author | Tim Peters <tim.peters@gmail.com> | 2005-03-28 01:08:02 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2005-03-28 01:08:02 (GMT) |
commit | eba28bea9b8ef7df010e65c630b8c0f7009c6005 (patch) | |
tree | 9ec2d5adb6886c2577a8c20e4e51d6d7ed393ec4 /Lib/distutils | |
parent | 700f36c7520bffef73d86088fa80b7a1c62c416a (diff) | |
download | cpython-eba28bea9b8ef7df010e65c630b8c0f7009c6005.zip cpython-eba28bea9b8ef7df010e65c630b8c0f7009c6005.tar.gz cpython-eba28bea9b8ef7df010e65c630b8c0f7009c6005.tar.bz2 |
Whitespace normalization.
Diffstat (limited to 'Lib/distutils')
-rw-r--r-- | Lib/distutils/command/upload.py | 9 | ||||
-rw-r--r-- | Lib/distutils/tests/test_dist.py | 2 | ||||
-rw-r--r-- | Lib/distutils/tests/test_versionpredicate.py | 2 | ||||
-rw-r--r-- | Lib/distutils/versionpredicate.py | 6 |
4 files changed, 9 insertions, 10 deletions
diff --git a/Lib/distutils/command/upload.py b/Lib/distutils/command/upload.py index d1d5ec6..7b08336 100644 --- a/Lib/distutils/command/upload.py +++ b/Lib/distutils/command/upload.py @@ -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 - diff --git a/Lib/distutils/tests/test_dist.py b/Lib/distutils/tests/test_dist.py index 7675fbf..4d2a7cd 100644 --- a/Lib/distutils/tests/test_dist.py +++ b/Lib/distutils/tests/test_dist.py @@ -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) diff --git a/Lib/distutils/tests/test_versionpredicate.py b/Lib/distutils/tests/test_versionpredicate.py index 44cb41e..8a60dbe 100644 --- a/Lib/distutils/tests/test_versionpredicate.py +++ b/Lib/distutils/tests/test_versionpredicate.py @@ -6,4 +6,4 @@ import distutils.versionpredicate import doctest def test_suite(): - return doctest.DocTestSuite(distutils.versionpredicate) + return doctest.DocTestSuite(distutils.versionpredicate) diff --git a/Lib/distutils/versionpredicate.py b/Lib/distutils/versionpredicate.py index 62d89f8..ba8b6c0 100644 --- a/Lib/distutils/versionpredicate.py +++ b/Lib/distutils/versionpredicate.py @@ -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 = [] |