Skip to content

Commit

Permalink
formatte message erreur
Browse files Browse the repository at this point in the history
corrige  Scrat95220#41 
au moins en partie
  • Loading branch information
Overnuts authored Sep 22, 2022
1 parent 8806764 commit 8a9b1af
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gazpar.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ def login():
resp1 = session.post(LOGIN_BASE_URI, data=payload, headers=headers)
logging.debug("1st Auth Response : \n" + resp1.text)
if resp1.status_code != requests.codes.ok:
print("Login call - error status :"+resp1.status_code+'\n');
logging.error("Login call - error status :"+resp1.status_code+'\n')
print("Login call - error status :"+ str( resp1.status_code ) +'\n');
logging.error("Login call - error status :"+ str( resp1.status_code ) +'\n')
exit()

j = json.loads(resp1.text)
Expand All @@ -116,8 +116,8 @@ def login():
resp2 = session.get(API_BASE_URI, allow_redirects=True)
logging.debug("2nd API Response : \n" + resp2.text)
if resp2.status_code != requests.codes.ok:
print("Login 2nd call - error status :"+resp2.status_code+'\n');
logging.error("Login 2nd call - error status :"+resp2.status_code+'\n')
print("Login 2nd call - error status :"+ str( resp2.status_code ) +'\n');
logging.error("Login 2nd call - error status :"+ str( resp2.status_code ) +'\n')
exit()

return session
Expand Down

0 comments on commit 8a9b1af

Please sign in to comment.