mirror of
https://github.com/lektor/lektor-website.git
synced 2025-02-22 07:00:38 +01:00
Error reporting if deletion fails.
This commit is contained in:
parent
441b47fb55
commit
f06f96cc3a
@ -103,7 +103,13 @@ def main():
|
||||
print 'Aborted!'
|
||||
sys.exit()
|
||||
|
||||
shutil.rmtree(get_location())
|
||||
def report_error(func, path, excinfo):
|
||||
print('Problem deleting {}, {}, {}'.format(func, path, excinfo))
|
||||
print('Please try and delete {} manually'.format(get_location())
|
||||
print('Aborted!')
|
||||
sys.exit()
|
||||
|
||||
shutil.rmtree(get_location(), onerror=report_error)
|
||||
|
||||
|
||||
print ' Installing at: %s' % install_dir
|
||||
|
Loading…
Reference in New Issue
Block a user