Skip to content
Snippets Groups Projects
Commit 79319cf8 authored by Wernle, Alexandra Nicole's avatar Wernle, Alexandra Nicole
Browse files

Added confirm method as a check to user

parent a60191e1
No related branches found
No related tags found
1 merge request!192Add spreadsheet factory functionality to copy_absolutes.py
......@@ -71,7 +71,15 @@ def copy_absolutes(
starttime=UTCDateTime(starttime),
endtime=UTCDateTime(endtime),
)
# confirm whether or not to copy absolutes
print(f"Found {len(readings)} absolutes")
copy = typer.confirm(f"Are you sure you want to copy {len(readings)} absolutes?")
if not copy:
print("Not copying absolutes")
raise typer.Abort()
print("Copying over absolutes")
# write readings to metadata service
metadata_factory = MetadataFactory(token=metadata_token, url=metadata_url)
with typer.progressbar(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment