From 77376e5b3dfa5a910e7a0dd333d70e2ba886cdf5 Mon Sep 17 00:00:00 2001 From: Thomas Lundström Date: Thu, 23 Jun 2016 09:20:18 +0200 Subject: Added override mechanism in gen_known_issues.py --- doc/gen_known_issues.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/doc/gen_known_issues.py b/doc/gen_known_issues.py index a400577..84af554 100644 --- a/doc/gen_known_issues.py +++ b/doc/gen_known_issues.py @@ -1,9 +1,40 @@ #!/usr/bin/python +#------------------------------------------------------------------------------ +# +# This script generates an XML file with a table with issues in Jira. See the +# variable 'conditions' for query details. It is used bu the make system in +# the generation of the release notes. +# +# The result is printed to STDOUT. +# +# It is possible to override the generation. If there is a file named +# jiraissues_override.xml in the current directory, then that file will be +# printed instead. This mechanism can be used if the table needs manual +# modifications. +# +#------------------------------------------------------------------------------ + from subprocess import check_output import json, re, datetime import time +try: + with open("jiraissues_override.xml") as f: + print f.read(), + + exit(0) + +except SystemExit: + # Printing the override file was successful. Exception raised by + # the exit() call in the try block. + exit(0) + +except IOError: + # Accessing the override file failed. Assume that it does not exist + # and proceed with normal operation. + pass + jd = json.JSONDecoder() def jira_query(query): -- cgit v1.2.3-54-g00ecf