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 via email to