Use unused cleanup_autogenerated_file

This commit is contained in:
Alexander Hedges 2015-11-07 18:33:07 +01:00 committed by ridiculousfish
parent 2bbad22248
commit 32d54e37f7

View file

@ -690,14 +690,7 @@ def cleanup_autogenerated_completions_in_directory(dir):
# Skip non .fish files
if not filename.endswith('.fish'): continue
path = os.path.join(dir, filename)
try:
if file_is_overwritable(path):
os.unlink(path)
except IOError:
pass
except OSError:
pass
cleanup_autogenerated_file(path)
except OSError as err:
return False