Skip to content

Commit 76b5f76

Browse files
committed
Improve message formatting.
1 parent 5eff83e commit 76b5f76

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

vultr/vultr.py

+13-13
Original file line numberDiff line numberDiff line change
@@ -1329,27 +1329,27 @@ def request(self, path, params={}, method='GET'):
13291329

13301330
if resp.status_code != 200:
13311331
if resp.status_code == 400:
1332-
raise VultrError('Invalid API location. Check the URL that you \
1333-
are using')
1332+
raise VultrError('Invalid API location. Check the URL that' +
1333+
' you are using')
13341334
elif resp.status_code == 403:
1335-
raise VultrError('Invalid or missing API key. Check that your \
1336-
API key is present and matches your assigned\
1337-
key')
1335+
raise VultrError('Invalid or missing API key. Check that' +
1336+
' your API key is present and matches' +
1337+
' your assigned key')
13381338
elif resp.status_code == 405:
1339-
raise VultrError('Invalid HTTP method. Check that the method \
1340-
(POST|GET) matches what the documentation \
1341-
indicates')
1339+
raise VultrError('Invalid HTTP method. Check that the' +
1340+
' method (POST|GET) matches what the' +
1341+
' documentation indicates')
13421342
elif resp.status_code == 412:
13431343
raise VultrError('Request failed. Check the response body ' +
13441344
'for a more detailed description. Body: \n' +
13451345
resp.text)
13461346
elif resp.status_code == 500:
1347-
raise VultrError('Internal server error. Try again at a later \
1348-
time')
1347+
raise VultrError('Internal server error. Try again at a' +
1348+
' later time')
13491349
elif resp.status_code == 503:
1350-
raise VultrError('Rate limit hit. API requests are limited to \
1351-
an average of 1/s. Try your request again \
1352-
later.')
1350+
raise VultrError('Rate limit hit. API requests are limited' +
1351+
' to an average of 1/s. Try your request' +
1352+
' again later.')
13531353

13541354
return resp.json()
13551355

0 commit comments

Comments
 (0)