From 3cde4a2e1e8e727e9af66fa0aedfe18129780bb6 Mon Sep 17 00:00:00 2001 From: "Ryan S. Arnold" Date: Tue, 6 Sep 2016 15:37:15 -0500 Subject: Reorder code so user is only asked once each iteration if they'd like to modify README.textile.series. --- rn.py | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/rn.py b/rn.py index 3f018bc..efbe275 100644 --- a/rn.py +++ b/rn.py @@ -86,17 +86,11 @@ def generate(track, to_date, to_series, gccsource, persist): print "Please verify that your changes have been committed on the template branch:" next_rn.rn_template.log(1) - ans="y" - history="" - while not ans=="n": - # Only prompt for the history file once. - if not history: - history=finput('Please enter the location of the changelog csv file: ', "6.1-2016.06.csv") - - if next_rn.update_series_readmes(): - print "Please verify that your changes have been committed on the series branch:" - next_rn.rn_series.log(1) + ans=True + history=finput('Please enter the location of the changelog csv file: ', "6.1-2016.06.csv") + next_rn.update_series_readmes() + while ans==True: # Generate the temporary output files to the projdir. with cd(rnProj[0].projdir): try: @@ -104,13 +98,10 @@ def generate(track, to_date, to_series, gccsource, persist): except TemplateSyntaxError: traceback.print_exc(file=sys.stdout) print "Please correct the template and try again." - continue print "Please direct your browser to the rendered .html files in" print "%s and make sure that they look correct." % rnProj[0].projdir - print "Would you like to edit the series README.textile.series file" - ans=yninput( - "again and regenerate the release notes?", "N") + ans=next_rn.update_series_readmes() # Verify that the GCC Source is located where it says it is. class VerifyGCCSourceAction(argparse.Action): -- cgit v1.2.3