We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c1ff3ba commit 45ab0ccCopy full SHA for 45ab0cc
src/check_python_h_first/get_submodule_paths.py
@@ -40,11 +40,14 @@ def get_submodule_paths():
40
os.path.join(root_directory, path) for path in submodule_paths
41
]
42
# vendored with a script rather than via gitmodules
43
- with open(os.path.join(root_directory, ".gitattributes"), "r") as attr_file:
44
- for line in attr_file:
45
- if "vendored" in line:
46
- pattern = line.split(" ", 1)[0]
47
- submodule_paths.extend(glob.glob(pattern))
+ try:
+ with open(os.path.join(root_directory, ".gitattributes"), "r") as attr_file:
+ for line in attr_file:
+ if "vendored" in line:
+ pattern = line.split(" ", 1)[0]
48
+ submodule_paths.extend(glob.glob(pattern))
49
+ except FileNotFoundError:
50
+ pass
51
52
return submodule_paths
53
0 commit comments