Commit 507ca276 authored by Rudel Fankep's avatar Rudel Fankep
Browse files

security to delete

parent f2e0e504
......@@ -347,6 +347,8 @@ def download(args):
def delete(args):
if args.database in data.keys():
if args.tool in data[args.database]['tool'].keys() or args.tool == "raw":
frage = input('Do you want to continue (Y/N)? ')
if frage.lower() == 'y':
if args.place == 'local':
version = get_local_json_version(args)
dbman_dir = get_local_databases_directory(args)
......@@ -377,6 +379,8 @@ def delete(args):
print("The {} files were successfully delete from: ".format(get_tool_directory_name(args, version)) + web_store)
else:
print("The {} files aren't existing in: ".format(get_tool_directory_name(args, version)) + web_store)
else:
print('delete canceled')
else:
print('Tool error. There are following possibility: {}'.format([tool for tool in data[args.database]['tool'].keys()]))
else:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment