Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(3)

Delta Between Two Patch Sets: Lib/distutils/command/upload.py

Issue 21722: teach distutils "upload" to exit with code != 0 when error occurs
Left Patch Set: Created 5 years, 11 months ago
Right Patch Set: Created 5 years, 11 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « no previous file | Lib/distutils/tests/test_upload.py » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 """distutils.command.upload 1 """distutils.command.upload
2 2
3 Implements the Distutils 'upload' subcommand (upload package to PyPI).""" 3 Implements the Distutils 'upload' subcommand (upload package to PyPI)."""
4 import os 4 import os
5 import socket 5 import socket
6 import platform 6 import platform
7 from urllib2 import urlopen, Request, HTTPError 7 from urllib2 import urlopen, Request, HTTPError
8 from base64 import standard_b64encode 8 from base64 import standard_b64encode
9 import urlparse 9 import urlparse
10 import cStringIO as StringIO 10 import cStringIO as StringIO
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 status = e.code 186 status = e.code
187 reason = e.msg 187 reason = e.msg
188 188
189 if status == 200: 189 if status == 200:
190 self.announce('Server response (%s): %s' % (status, reason), 190 self.announce('Server response (%s): %s' % (status, reason),
191 log.INFO) 191 log.INFO)
192 else: 192 else:
193 msg = 'Upload failed (%s): %s' % (status, reason) 193 msg = 'Upload failed (%s): %s' % (status, reason)
194 self.announce(msg, log.ERROR) 194 self.announce(msg, log.ERROR)
195 raise DistutilsError(msg) 195 raise DistutilsError(msg)
LEFTRIGHT

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+