8000 Merge pull request #1590 from Hawk777/init-exceptions · gitpython-developers/GitPython@80ea0f5 · GitHub
[go: up one dir, main page]

Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 80ea0f5

Browse files
authored
Merge pull request #1590 from Hawk777/init-exceptions
Name top-level exceptions as private variables
2 parents e3bc5d1 + 2a0305b commit 80ea0f5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

git/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,8 @@ def _init_externals() -> None:
5656
Actor,
5757
rmtree,
5858
)
59-
except GitError as exc:
60-
raise ImportError("%s: %s" % (exc.__class__.__name__, exc)) from exc
59+
except GitError as _exc:
60+
raise ImportError("%s: %s" % (_exc.__class__.__name__, _exc)) from _exc
6161

6262
# } END imports
6363

@@ -87,6 +87,6 @@ def refresh(path: Optional[PathLike] = None) -> None:
8787
#################
8888
try:
8989
refresh()
90-
except Exception as exc:
91-
raise ImportError("Failed to initialize: {0}".format(exc)) from exc
90+
except Exception as _exc:
91+
raise ImportError("Failed to initialize: {0}".format(_exc)) from _exc
9292
#################

0 commit comments

Comments
 (0)
0