1
0
mirror of https://github.com/djohnlewis/stackdump synced 2024-12-04 23:17:37 +00:00

Added confirmation when deleting sites.

This commit is contained in:
Samuel Lai 2012-02-12 21:11:42 +11:00
parent 3b1393d9c2
commit 105be00e9e

View File

@ -80,6 +80,12 @@ if __name__ == '__main__':
if cmd_options.list_sites:
list_sites()
elif cmd_options.delete_site:
# confirm with the user first
answer = raw_input('Are you sure you want to delete %s? ' % cmd_options.delete_site)
if answer.lower() != 'y':
sys.exit(1)
print ''
delete_site(cmd_options.delete_site)
else:
parser.print_help()