|
|
@ -318,11 +318,12 @@ def _SendChangeHTTP(options):
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
connection = urllib.urlopen(url, urllib.urlencode(values), proxies=proxies)
|
|
|
|
connection = urllib.urlopen(url, urllib.urlencode(values), proxies=proxies)
|
|
|
|
except IOError, e:
|
|
|
|
except IOError, e:
|
|
|
|
# TODO(thestig) this probably isn't quite right.
|
|
|
|
if (values.get('bot') and len(e.args) > 2 and
|
|
|
|
if values.get('bot') and e[2] == 'got a bad status line':
|
|
|
|
e.args[2] == 'got a bad status line'):
|
|
|
|
raise NoTryServerAccess('%s is unaccessible. Bad --bot argument?' % url)
|
|
|
|
raise NoTryServerAccess('%s is unaccessible. Bad --bot argument?' % url)
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
raise NoTryServerAccess('%s is unaccessible.' % url)
|
|
|
|
raise NoTryServerAccess('%s is unaccessible. Reason: %s' % (url,
|
|
|
|
|
|
|
|
str(e.args)))
|
|
|
|
if not connection:
|
|
|
|
if not connection:
|
|
|
|
raise NoTryServerAccess('%s is unaccessible.' % url)
|
|
|
|
raise NoTryServerAccess('%s is unaccessible.' % url)
|
|
|
|
if connection.read() != 'OK':
|
|
|
|
if connection.read() != 'OK':
|
|
|
|