From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 1B0151395E2 for ; Sun, 4 Dec 2016 08:53:44 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2DF6621C06D; Sun, 4 Dec 2016 08:53:43 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 0B63C21C06D for ; Sun, 4 Dec 2016 08:53:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F4156341024 for ; Sun, 4 Dec 2016 08:53:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9908F972 for ; Sun, 4 Dec 2016 08:53:40 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1480841609.61fc15ef48b0ffdabe101bb90a786600a6d56e1a.mgorny@gentoo> Subject: [gentoo-commits] proj/qa-scripts:master commit in: pkgcheck2html/ X-VCS-Repository: proj/qa-scripts X-VCS-Files: pkgcheck2html/pkgcheck2html.py X-VCS-Directories: pkgcheck2html/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 61fc15ef48b0ffdabe101bb90a786600a6d56e1a X-VCS-Branch: master Date: Sun, 4 Dec 2016 08:53:40 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: a2bb4efd-db82-4407-9839-f4ad7a9e332e X-Archives-Hash: 868d0d1752112a9c0ac0e3473edb3d1c commit: 61fc15ef48b0ffdabe101bb90a786600a6d56e1a Author: Michał Górny gentoo org> AuthorDate: Sun Dec 4 08:53:29 2016 +0000 Commit: Michał Górny gentoo 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)