Moved the formatting warning inside where we actually format, so we don't scare the users if we're not actually formatting

This commit is contained in:
Anton Hvornum 2019-11-13 22:19:32 +00:00
parent 01cb7da8a3
commit 2abef082a7
1 changed files with 4 additions and 6 deletions

View File

@ -641,13 +641,11 @@ if __name__ == '__main__':
print('[!] Disk PASSWORD is: {}'.format(args['password']))
print()
for i in range(5, 0, -1):
print(f'Formatting {args["drive"]} in {i}...')
sleep(1)
if not args['rerun'] or args['ignore-rerun']:
for i in range(5, 0, -1):
print(f'Formatting {args["drive"]} in {i}...')
sleep(1)
o = simple_command('/usr/bin/umount -R /mnt')
o = simple_command('/usr/bin/cryptsetup close /dev/mapper/luksdev')
print('[N] Setting up {drive}.'.format(**args))