Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

Commit491e134

Browse files
committed
Fix Improper Import Order Breakingfuzz_submodule Fuzzer
ClusterFuzz runs of the `fuzz_submodule` target have been failingbecause the `git` import was placed before the condition that sets theGit executable path.The order in which `git` is imported matters because it attempts to finda Git executable as the import is loaded (via `refresh()` in`git/__init__.py`.) As per#1909, we configure the ClusterFuzzenvironment to use a bundled Git executable via the env variablecondition in all fuzz targets.
1 parente51bfdf commit491e134

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

‎fuzzing/fuzz-targets/fuzz_submodule.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
importtempfile
55
fromconfigparserimportParsingError
66
fromutilsimportis_expected_exception_message,get_max_filename_length
7-
fromgitimportRepo,GitCommandError,InvalidGitRepositoryError
87

98
ifgetattr(sys,"frozen",False)andhasattr(sys,"_MEIPASS"):# pragma: no cover
109
path_to_bundled_git_binary=os.path.abspath(os.path.join(os.path.dirname(__file__),"git"))
1110
os.environ["GIT_PYTHON_GIT_EXECUTABLE"]=path_to_bundled_git_binary
1211

12+
fromgitimportRepo,GitCommandError,InvalidGitRepositoryError
13+
1314
ifnotsys.warnoptions:# pragma: no cover
1415
# The warnings filter below can be overridden by passing the -W option
1516
# to the Python interpreter command line or setting the `PYTHONWARNINGS` environment variable.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp