commit:     61fc15ef48b0ffdabe101bb90a786600a6d56e1a
Author:     Michał Górny <mgorny <AT> gentoo <DOT> org>
AuthorDate: Sun Dec  4 08:53:29 2016 +0000
Commit:     Michał Górny <mgorny <AT> gentoo <DOT> org>
CommitDate: Sun Dec  4 08:53:29 2016 +0000
URL:        https://gitweb.gentoo.org/proj/qa-scripts.git/commit/?id=61fc15ef

pkgcheck2html: Add stdin support

 pkgcheck2html/pkgcheck2html.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/pkgcheck2html/pkgcheck2html.py b/pkgcheck2html/pkgcheck2html.py
index 466d8c1..44a9c2b 100755
--- a/pkgcheck2html/pkgcheck2html.py
+++ b/pkgcheck2html/pkgcheck2html.py
@@ -34,6 +34,8 @@ def result_sort_key(r):
 
 def get_results(input_paths, class_mapping):
     for input_path in input_paths:
+        if input_path == '-':
+            input_path = sys.stdin
         checks = xml.etree.ElementTree.parse(input_path).getroot()
         for r in checks:
             yield Result(r, class_mapping)

Reply via email to