diff options
author | Sebastian Thiel <sebastian.thiel@icloud.com> | 2023-05-15 21:09:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-15 21:09:35 +0200 |
commit | 80ea0f507d9f448e417fc24e69e68c883181fb3c (patch) | |
tree | 74299948b12c8f2575bbc71925cf10993eae5c7c /git/__init__.py | |
parent | e3bc5d10629ada4d61fdf61353668a58c5610d6b (diff) | |
parent | 2a0305b349f61bddae674eb8f4efe0fd3c916bbf (diff) | |
download | gitpython-main.tar.gz |
Name top-level exceptions as private variables
Diffstat (limited to 'git/__init__.py')
-rw-r--r-- | git/__init__.py | 8 |
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 ################# |