More helpful user-actionable failure.

This commit is contained in:
Anthony Plunkett 2016-02-09 17:47:11 -04:00
parent 6db7d177ae
commit 0a6ac772ee
1 changed files with 5 additions and 2 deletions

View File

@ -97,19 +97,22 @@ def main():
install_dir, lib_dir = find_location() install_dir, lib_dir = find_location()
if install_dir == None: if install_dir == None:
print 'Lektor seems to be already installed' print ' Lektor seems to be already installed at:'
print ' {}'.format(get_location())
while 1: while 1:
input = raw_input( input = raw_input(
'Delete existing and reinstall? [Yn]' 'Delete existing and reinstall? [Yn]'
).lower().strip() ).lower().strip()
if input in ('', 'y'): if input in ('', 'y'):
shutil.rmtree(get_location()) shutil.rmtree(get_location(), onerror=deletion_error)
break break
elif input == 'n': elif input == 'n':
print 'Aborted!' print 'Aborted!'
sys.exit() sys.exit()
install_dir, lib_dir = find_location()
print ' Installing at: %s' % install_dir print ' Installing at: %s' % install_dir
while 1: while 1:
input = raw_input('Continue? [Yn] ').lower().strip() input = raw_input('Continue? [Yn] ').lower().strip()