Skip to content

Commit

Permalink
Améliorer le message ; id requête automatisée
Browse files Browse the repository at this point in the history
  • Loading branch information
julienmalard committed Dec 8, 2024
1 parent 1dc4a15 commit 74e51ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions constellationPy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,10 @@ async def connecter(soimême, canal_erreurs: Optional[trio.MemorySendChannel] =
# démarrer l'écoute
soimême._context_annuler_écoute = await soimême.pouponnière.start(soimême._écouter)

def demander_code_secret(soimême, idRequête):
def demander_code_secret(soimême, idRequête=None):
idRequête = idRequête or f"Python - {random.randint(1000, 9999)}"
print(
f"En attente du code secret. Veuillez approuver la requête « {idRequête} » sur l'application Constellation."
f"En attente d'autorisation. Veuillez approuver la requête « {idRequête} » sur l'application Constellation."
)
réponse = requests.get(f"http://localhost:{soimême.port}/demande/?id={urllib.parse.quote_plus(idRequête)}")
return réponse.content
Expand Down

0 comments on commit 74e51ef

Please sign in to comment.