From 172bcfa8107416f9c38de6adba5b29ac4336ffa0 Mon Sep 17 00:00:00 2001 From: skyanth Date: Mon, 3 Jul 2017 15:16:42 +0200 Subject: [PATCH] execsummary option for report build command fixed --- chatops/python/docbuilder.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/chatops/python/docbuilder.py b/chatops/python/docbuilder.py index 03de083..8f1f53a 100644 --- a/chatops/python/docbuilder.py +++ b/chatops/python/docbuilder.py @@ -56,13 +56,13 @@ the Free Software Foundation, either version 3 of the License, or help='overwrite output file if it already exists') parser.add_argument('-date', action='store', help='the invoice date') - parser.add_argument('-execsummary', action='store', + parser.add_argument('-execsummary', action='store_true', help="""create an executive summary as well as a report (true/false). Default: false """) parser.add_argument('--fop-config', action='store', - default='/etc/docbuilder/fop.xconf', + default='/etc/docbuilder/fop.conf', help="""fop configuration file (default - /etc/docbuilder/fop.xconf""") + /etc/docbuilder/fop.conf""") parser.add_argument('-f', '--fop', action='store', default='../target/report.fo', help="""intermediate fop output file (default: @@ -151,7 +151,7 @@ def to_fo(options): if options['date']: cmd.append('DATE=' + options['date']) if options['execsummary']: - cmd.append('EXEC_SUMMARY=' + options['execsummary']) + cmd.append('EXEC_SUMMARY=true') process = subprocess.Popen(cmd, stdout=PIPE, stderr=PIPE) stdout, stderr = process.communicate() print_output(stdout, stderr) @@ -234,7 +234,7 @@ def main(): except OSError as exception: print_exit('[-] ERR: {0}'.format(exception.strerror), exception.errno) - if options['execsummary'] == 'true': # we're generating a summary as well as a report + if options['execsummary'] == True: # we're generating a summary as well as a report report_output = options['output'] verboseprint('generating additional executive summary') output_dir = os.path.dirname(options['output']) @@ -260,4 +260,4 @@ def main(): if __name__ == "__main__": - main() + main() \ No newline at end of file