1 |
commit: 61fc15ef48b0ffdabe101bb90a786600a6d56e1a |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 4 08:53:29 2016 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 4 08:53:29 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=61fc15ef |
7 |
|
8 |
pkgcheck2html: Add stdin support |
9 |
|
10 |
pkgcheck2html/pkgcheck2html.py | 2 ++ |
11 |
1 file changed, 2 insertions(+) |
12 |
|
13 |
diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py |
14 |
index 466d8c1..44a9c2b 100755 |
15 |
--- a/pkgcheck2html/pkgcheck2html.py |
16 |
+++ b/pkgcheck2html/pkgcheck2html.py |
17 |
@@ -34,6 +34,8 @@ def result_sort_key(r): |
18 |
|
19 |
def get_results(input_paths, class_mapping): |
20 |
for input_path in input_paths: |
21 |
+ if input_path == '-': |
22 |
+ input_path = sys.stdin |
23 |
checks = xml.etree.ElementTree.parse(input_path).getroot() |
24 |
for r in checks: |
25 |
yield Result(r, class_mapping) |