public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/, bin/
Date: Sun, 10 Dec 2023 22:01:55 +0000 (UTC)	[thread overview]
Message-ID: <1702245708.112594d7606bbb795da3ec8a01c6e295fba864d3.sam@gentoo> (raw)

commit:     112594d7606bbb795da3ec8a01c6e295fba864d3
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Sep 23 13:16:23 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> 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 <sam <AT> 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():


             reply	other threads:[~2023-12-10 22:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-10 22:01 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2019-11-17 20:21 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/resolver/, bin/ Zac Medico
2019-01-13 23:38 Zac Medico

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1702245708.112594d7606bbb795da3ec8a01c6e295fba864d3.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox