Skip to content

Commit

Permalink
Don't use Rich for confirmation prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
jcardonnet committed Oct 10, 2023
1 parent 51ccffd commit 0b4f108
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/syft/src/syft/util/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
from nacl.signing import SigningKey
from nacl.signing import VerifyKey
import requests
from rich.prompt import Confirm

# relative
from .logger import critical
Expand Down Expand Up @@ -451,11 +450,15 @@ def prompt_warning_message(message: str, confirm: bool = False) -> bool:
warning = SyftWarning(message=message)
display(warning)

if confirm:
allowed = Confirm.ask("Would you like to proceed?")
if not allowed:
while confirm:
response = input("Would you like to proceed? [y/n]: ").lower()
if response == "y":
return True
elif response == "n":
display("Aborted !!")
return False
else:
print("Invalid response. Please enter Y or N.")

return True

Expand Down

0 comments on commit 0b4f108

Please sign in to comment.