diff options
author | Thomas Lundström <thomas.lundstrom@enea.com> | 2016-06-23 09:20:18 +0200 |
---|---|---|
committer | Thomas Lundström <thomas.lundstrom@enea.com> | 2016-06-23 09:20:18 +0200 |
commit | 77376e5b3dfa5a910e7a0dd333d70e2ba886cdf5 (patch) | |
tree | 8baa23d6c8008b965a3a675863a7597410cdfee0 /doc/gen_known_issues.py | |
parent | b26854f76b2fa8d44937bdae0664b1a24b2c7e78 (diff) | |
download | el_releases-networking-77376e5b3dfa5a910e7a0dd333d70e2ba886cdf5.tar.gz |
Added override mechanism in gen_known_issues.py
Diffstat (limited to 'doc/gen_known_issues.py')
-rw-r--r-- | doc/gen_known_issues.py | 31 |
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 | |||
3 | from subprocess import check_output | 18 | from subprocess import check_output |
4 | import json, re, datetime | 19 | import json, re, datetime |
5 | import time | 20 | import time |
6 | 21 | ||
22 | try: | ||
23 | with open("jiraissues_override.xml") as f: | ||
24 | print f.read(), | ||
25 | |||
26 | exit(0) | ||
27 | |||
28 | except SystemExit: | ||
29 | # Printing the override file was successful. Exception raised by | ||
30 | # the exit() call in the try block. | ||
31 | exit(0) | ||
32 | |||
33 | except IOError: | ||
34 | # Accessing the override file failed. Assume that it does not exist | ||
35 | # and proceed with normal operation. | ||
36 | pass | ||
37 | |||
7 | jd = json.JSONDecoder() | 38 | jd = json.JSONDecoder() |
8 | 39 | ||
9 | def jira_query(query): | 40 | def jira_query(query): |