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 0014C138335 for ; Tue, 26 Mar 2019 10:17:41 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0DEA1E089C; Tue, 26 Mar 2019 10:17:39 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id D2278E089B for ; Tue, 26 Mar 2019 10:17:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7918F335D08 for ; Tue, 26 Mar 2019 10:17:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 742FE58A for ; Tue, 26 Mar 2019 10:17:34 +0000 (UTC) From: "Jason Zaman" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Jason Zaman" Message-ID: <1553508325.6b260827b085206d6796b69a48f931ddb2c0c328.perfinion@gentoo> Subject: [gentoo-commits] proj/hardened-refpolicy:master commit in: support/ X-VCS-Repository: proj/hardened-refpolicy X-VCS-Files: support/genhomedircon.py X-VCS-Directories: support/ X-VCS-Committer: perfinion X-VCS-Committer-Name: Jason Zaman X-VCS-Revision: 6b260827b085206d6796b69a48f931ddb2c0c328 X-VCS-Branch: master Date: Tue, 26 Mar 2019 10:17:34 +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-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: ec0ce11e-69dd-480f-b800-e3815d4e63dc X-Archives-Hash: 67578529739309b016bded08bb1ed67d commit: 6b260827b085206d6796b69a48f931ddb2c0c328 Author: Chris PeBenito microsoft com> AuthorDate: Fri Mar 15 13:25:00 2019 +0000 Commit: Jason Zaman gentoo org> CommitDate: Mon Mar 25 10:05:25 2019 +0000 URL: https://gitweb.gentoo.org/proj/hardened-refpolicy.git/commit/?id=6b260827 genhomedircon.py: Fix top-level exception handling. Fixes errors like this: Traceback (most recent call last): File "support/genhomedircon.py", line 490, in errorExit("Options Error " + error) TypeError: Can't convert 'GetoptError' object to str implicitly Signed-off-by: Chris PeBenito microsoft.com> Signed-off-by: Jason Zaman perfinion.com> support/genhomedircon.py | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/support/genhomedircon.py b/support/genhomedircon.py index 6662f412..3503fb4a 100644 --- a/support/genhomedircon.py +++ b/support/genhomedircon.py @@ -486,9 +486,5 @@ try: selconf=selinuxConfig(directory, setype, usepwd) selconf.write() -except getopt.error as error: - errorExit("Options Error " + error) -except ValueError as error: - errorExit("ValueError " + error) -except IndexError: - errorExit("IndexError") +except Exception as error: + errorExit(error)