summaryrefslogtreecommitdiffstats
path: root/git_config.py
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2023-10-20 23:32:40 +0545
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2023-10-21 00:56:10 +0000
commitae824fb2fc2770c84cc34c1956e4c76c8c972860 (patch)
tree4f8ec44e29c7401b99b3aef1b28a2104a0a86221 /git_config.py
parent034950b9eebacd6598ea518a0b254845bc806ab6 (diff)
downloadgit-repo-ae824fb2fc2770c84cc34c1956e4c76c8c972860.tar.gz
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 <aravindvasudev@google.com> Commit-Queue: Mike Frysinger <vapier@google.com> Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'git_config.py')
-rw-r--r--git_config.py4
1 files changed, 2 insertions, 2 deletions
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:
370 with Trace(": parsing %s", self.file): 370 with Trace(": parsing %s", self.file):
371 with open(self._json) as fd: 371 with open(self._json) as fd:
372 return json.load(fd) 372 return json.load(fd)
373 except (IOError, ValueError): 373 except (OSError, ValueError):
374 platform_utils.remove(self._json, missing_ok=True) 374 platform_utils.remove(self._json, missing_ok=True)
375 return None 375 return None
376 376
@@ -378,7 +378,7 @@ class GitConfig:
378 try: 378 try:
379 with open(self._json, "w") as fd: 379 with open(self._json, "w") as fd:
380 json.dump(cache, fd, indent=2) 380 json.dump(cache, fd, indent=2)
381 except (IOError, TypeError): 381 except (OSError, TypeError):
382 platform_utils.remove(self._json, missing_ok=True) 382 platform_utils.remove(self._json, missing_ok=True)
383 383
384 def _ReadGit(self): 384 def _ReadGit(self):