From ae824fb2fc2770c84cc34c1956e4c76c8c972860 Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Fri, 20 Oct 2023 23:32:40 +0545 Subject: cleanup: convert exceptions to OSError In Python 3, these exceptions were merged into OSError, so switch everything over to that. Change-Id: If876a28b692de5aa5c62a3bdc8c000793ce52c63 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/390376 Reviewed-by: Aravind Vasudevan Commit-Queue: Mike Frysinger Tested-by: Mike Frysinger --- git_config.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'git_config.py') diff --git a/git_config.py b/git_config.py index 1bde4795..6aa8d855 100644 --- a/git_config.py +++ b/git_config.py @@ -370,7 +370,7 @@ class GitConfig: with Trace(": parsing %s", self.file): with open(self._json) as fd: return json.load(fd) - except (IOError, ValueError): + except (OSError, ValueError): platform_utils.remove(self._json, missing_ok=True) return None @@ -378,7 +378,7 @@ class GitConfig: try: with open(self._json, "w") as fd: json.dump(cache, fd, indent=2) - except (IOError, TypeError): + except (OSError, TypeError): platform_utils.remove(self._json, missing_ok=True) def _ReadGit(self): -- cgit v1.2.3-54-g00ecf