mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1455378 Give an informative error message of you try to ./mach pastebin too large a file. r=gps
--HG-- extra : rebase_source : 719fb33701b159955494031708d9366a57b31f9a
This commit is contained in:
parent
70e1c57e9b
commit
8728bdccf7
@ -151,7 +151,14 @@ class PastebinProvider(object):
|
||||
response = urllib2.urlopen(req)
|
||||
http_response_code = response.getcode()
|
||||
if http_response_code == 200:
|
||||
print(response.geturl())
|
||||
pasteurl = response.geturl()
|
||||
if pasteurl == URL:
|
||||
if "Query failure: Data too long for column" in response.readline():
|
||||
print('ERROR. Request too large. Limit is 64KB.')
|
||||
else:
|
||||
print('ERROR. Unknown error')
|
||||
else:
|
||||
print(pasteurl)
|
||||
else:
|
||||
print('Could not upload the file, '
|
||||
'HTTP Response Code %s' % (http_response_code))
|
||||
|
Loading…
Reference in New Issue
Block a user