summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Lundström <thomas.lundstrom@enea.com>2016-06-23 09:20:18 +0200
committerThomas Lundström <thomas.lundstrom@enea.com>2016-06-23 09:20:18 +0200
commit77376e5b3dfa5a910e7a0dd333d70e2ba886cdf5 (patch)
tree8baa23d6c8008b965a3a675863a7597410cdfee0
parentb26854f76b2fa8d44937bdae0664b1a24b2c7e78 (diff)
downloadel_releases-networking-77376e5b3dfa5a910e7a0dd333d70e2ba886cdf5.tar.gz
Added override mechanism in gen_known_issues.py
-rw-r--r--doc/gen_known_issues.py31
1 files changed, 31 insertions, 0 deletions
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 @@
1#!/usr/bin/python 1#!/usr/bin/python
2 2
3#------------------------------------------------------------------------------
4#
5# This script generates an XML file with a table with issues in Jira. See the
6# variable 'conditions' for query details. It is used bu the make system in
7# the generation of the release notes.
8#
9# The result is printed to STDOUT.
10#
11# It is possible to override the generation. If there is a file named
12# jiraissues_override.xml in the current directory, then that file will be
13# printed instead. This mechanism can be used if the table needs manual
14# modifications.
15#
16#------------------------------------------------------------------------------
17
3from subprocess import check_output 18from subprocess import check_output
4import json, re, datetime 19import json, re, datetime
5import time 20import time
6 21
22try:
23 with open("jiraissues_override.xml") as f:
24 print f.read(),
25
26 exit(0)
27
28except SystemExit:
29 # Printing the override file was successful. Exception raised by
30 # the exit() call in the try block.
31 exit(0)
32
33except IOError:
34 # Accessing the override file failed. Assume that it does not exist
35 # and proceed with normal operation.
36 pass
37
7jd = json.JSONDecoder() 38jd = json.JSONDecoder()
8 39
9def jira_query(query): 40def jira_query(query):