From a2206aeb5b0c267fa73f863e128b83ba0925f796 Mon Sep 17 00:00:00 2001 From: Eric Fried Date: Thu, 16 Aug 2018 17:14:19 -0500 Subject: [PATCH] Delete approved template in move_implemented_specs The move_implemented_specs tool was cleverly removing the implemented/-template.rst link so it didn't clutter up the TOC. This patch whacks the approved/-template.rst link as well. Change-Id: Icf75ce9d27a6ca5cdfcc147698d79669bbfbdba8 --- tools/move_implemented_specs.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/move_implemented_specs.py b/tools/move_implemented_specs.py index 69e3cda32..67cb75e4f 100644 --- a/tools/move_implemented_specs.py +++ b/tools/move_implemented_specs.py @@ -85,9 +85,11 @@ def move_implemented_specs(release, verbose=False, dry_run=False): 'spec filename should be fixed.' % bp_name) warnings.append(spec_fname) - template_file = os.path.join(implemented_dir, template_file) - if not dry_run and move_count and os.path.exists(template_file): - os.unlink(template_file) + if not dry_run and move_count: + for d in (implemented_dir, approved_dir): + f = os.path.join(d, template_file) + if os.path.exists(f): + os.unlink(f) if verbose: print('')