From 32d54e37f79447cab508e5ae21ae6c9b805408bd Mon Sep 17 00:00:00 2001 From: Alexander Hedges Date: Sat, 7 Nov 2015 18:33:07 +0100 Subject: [PATCH] Use unused cleanup_autogenerated_file --- share/tools/create_manpage_completions.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/share/tools/create_manpage_completions.py b/share/tools/create_manpage_completions.py index 2b0a04c9c..471205fef 100755 --- a/share/tools/create_manpage_completions.py +++ b/share/tools/create_manpage_completions.py @@ -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