Skip to content

Commit

Permalink
Merge pull request #443 from algolia/porting_p3
Browse files Browse the repository at this point in the history
Strings management: use the newest recommended way to handle literals
  • Loading branch information
Sylvain Pace authored May 28, 2019
2 parents b1165ea + 6ef8637 commit aeca859
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions deployer/src/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def make_request(endpoint, type=None, data=None, username=None, password=None,
data=data)

if r.status_code // 100 != 2:
print("ISSUE for POST request : " + url + " with params: " + str(
print('ISSUE for POST request : {} with params: {}'.format(url,
data))
print(r.text)
return r
Expand All @@ -77,8 +77,7 @@ def make_request(endpoint, type=None, data=None, username=None, password=None,
auth=(username, password))

if r.status_code not in success_codes:
print(
'ISSUE for DELETE request : {} with params: {}'.format(url,
print('ISSUE for DELETE request : {} with params: {}'.format(url,
data))
return r

Expand All @@ -88,7 +87,7 @@ def make_request(endpoint, type=None, data=None, username=None, password=None,
data=data)
print(r.status_code)
if r.status_code // 100 != 2:
print("ISSUE for PUT request : " + url + " with params: " + str(
print('ISSUE for PUT request : {} with params: {}'.format(url,
data))
return r

Expand All @@ -101,7 +100,7 @@ def make_request(endpoint, type=None, data=None, username=None, password=None,
auth=(username, password))

if r.status_code // 100 != 2:
print("ISSUE for GET request : " + url + " with params:" + data)
print('ISSUE for GET request : {} with params: {}'.format(url, data))

if json_request:
r.json()
Expand Down

0 comments on commit aeca859

Please sign in to comment.