summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2023-05-15 21:09:35 +0200
committerGitHub <noreply@github.com>2023-05-15 21:09:35 +0200
commit80ea0f507d9f448e417fc24e69e68c883181fb3c (patch)
tree74299948b12c8f2575bbc71925cf10993eae5c7c
parente3bc5d10629ada4d61fdf61353668a58c5610d6b (diff)
parent2a0305b349f61bddae674eb8f4efe0fd3c916bbf (diff)
downloadgitpython-main.tar.gz
Merge pull request #1590 from Hawk777/init-exceptionsHEADmain
Name top-level exceptions as private variables
-rw-r--r--git/__init__.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/__init__.py b/git/__init__.py
index f746e1fc..cd6602bf 100644
--- a/git/__init__.py
+++ b/git/__init__.py
@@ -56,8 +56,8 @@ try:
Actor,
rmtree,
)
-except GitError as exc:
- raise ImportError("%s: %s" % (exc.__class__.__name__, exc)) from exc
+except GitError as _exc:
+ raise ImportError("%s: %s" % (_exc.__class__.__name__, _exc)) from _exc
# } END imports
@@ -87,6 +87,6 @@ def refresh(path: Optional[PathLike] = None) -> None:
#################
try:
refresh()
-except Exception as exc:
- raise ImportError("Failed to initialize: {0}".format(exc)) from exc
+except Exception as _exc:
+ raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc
#################