| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 2d1efdc commit a8a43fe
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,6 @@ | |||
| 4 | 4 | # | |
| 5 | 5 | # This module is part of GitPython and is released under | |
| 6 | 6 | # the BSD License: https://opensource.org/license/bsd-3-clause/ | |
| 7 | - import contextlib | ||
| 8 | 7 | import inspect | |
| 9 | 8 | import logging | |
| 10 | 9 | import os | |
@@ -97,10 +96,8 @@ def _do_shell_combo(self, value_in_call, value_from_class): | |||
| 97 | 96 | # git.cmd gets Popen via a "from" import, so patch it there. | |
| 98 | 97 | with mock.patch.object(cmd, "Popen", wraps=cmd.Popen) as mock_popen: | |
| 99 | 98 | # Use a command with no arguments (besides the program name), so it runs | |
| 100 | - # with or without a shell, on all OSes, with the same effect. Since git | ||
| 101 | - # errors out when run with no arguments, we swallow that error. | ||
| 102 | - with contextlib.suppress(GitCommandError): | ||
| 103 | - self.git.execute(["git"], shell=value_in_call) | ||
| 99 | + # with or without a shell, on all OSes, with the same effect. | ||
| 100 | + self.git.execute(["git"], with_exceptions=False, shell=value_in_call) | ||
| 104 | 101 | ||
| 105 | 102 | return mock_popen | |
| 106 | 103 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments