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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CFC01158013 for ; Sun, 10 Dec 2023 22:01:59 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 854CA2BC013; Sun, 10 Dec 2023 22:01:58 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 4B2C82BC013 for ; Sun, 10 Dec 2023 22:01:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 3A9F83409EC for ; Sun, 10 Dec 2023 22:01:57 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 92C7814A8 for ; Sun, 10 Dec 2023 22:01:55 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1702245708.112594d7606bbb795da3ec8a01c6e295fba864d3.sam@gentoo> Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/, bin/ X-VCS-Repository: proj/portage X-VCS-Files: bin/dispatch-conf lib/portage/tests/resolver/ResolverPlayground.py X-VCS-Directories: lib/portage/tests/resolver/ bin/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 112594d7606bbb795da3ec8a01c6e295fba864d3 X-VCS-Branch: master Date: Sun, 10 Dec 2023 22:01:55 +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: 41bdd112-3c38-483f-8c5b-5eac04eeccf2 X-Archives-Hash: 5ebb5f45113a0f8d688c5cdb5e37e12b commit: 112594d7606bbb795da3ec8a01c6e295fba864d3 Author: Sam James gentoo org> AuthorDate: Sat Sep 23 13:16:23 2023 +0000 Commit: Sam James gentoo org> CommitDate: Sun Dec 10 22:01:48 2023 +0000 URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=112594d7 Small pyupgrade fixes Signed-off-by: Sam James gentoo.org> bin/dispatch-conf | 2 +- lib/portage/tests/resolver/ResolverPlayground.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/bin/dispatch-conf b/bin/dispatch-conf index 849be562ee..601110ce87 100755 --- a/bin/dispatch-conf +++ b/bin/dispatch-conf @@ -475,7 +475,7 @@ class dispatch: try: os.rename(newconf, curconf) - except (OSError, os.error) as why: + except OSError as why: writemsg( f"dispatch-conf: Error renaming {newconf} to {curconf}: {str(why)}; fatal\n", noiselevel=-1, diff --git a/lib/portage/tests/resolver/ResolverPlayground.py b/lib/portage/tests/resolver/ResolverPlayground.py index 115800a606..962550df37 100644 --- a/lib/portage/tests/resolver/ResolverPlayground.py +++ b/lib/portage/tests/resolver/ResolverPlayground.py @@ -262,7 +262,7 @@ class ResolverPlayground: try: os.makedirs(profile_path) - except os.error: + except OSError: pass repo_name_file = os.path.join(profile_path, "repo_name") @@ -305,7 +305,7 @@ class ResolverPlayground: ebuild_path = os.path.join(ebuild_dir, a.cpv.split("/")[1] + ".ebuild") try: os.makedirs(ebuild_dir) - except os.error: + except OSError: pass with open(ebuild_path, "w") as f: @@ -411,7 +411,7 @@ class ResolverPlayground: vdb_pkg_dir = os.path.join(self.vdbdir, a.cpv) try: os.makedirs(vdb_pkg_dir) - except os.error: + except OSError: pass metadata = installed[cpv].copy() @@ -457,7 +457,7 @@ class ResolverPlayground: try: os.makedirs(user_config_dir) - except os.error: + except OSError: pass for repo in self._repositories: @@ -639,7 +639,7 @@ class ResolverPlayground: try: os.makedirs(default_sets_conf_dir) - except os.error: + except OSError: pass provided_sets_portage_conf = os.path.join(str(cnf_path), "sets", "portage.conf") @@ -652,7 +652,7 @@ class ResolverPlayground: try: os.makedirs(set_config_dir) - except os.error: + except OSError: pass for sets_file, lines in sets.items():