Skip to content

Commit 3f693d3

Browse files
authored
Merge pull request #374 from github/fix-empty-excepts
fix: comment when an empty except occurs explaining why no action is taken
2 parents 5b5939d + 55af272 commit 3f693d3

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

dependabot_file.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ def build_dependabot_file(
208208
)
209209
break
210210
except github3.exceptions.NotFoundError:
211+
# The file does not exist and is not required,
212+
# so we should continue to the next one rather than raising error or logging
211213
pass
212214

213215
# detect package managers with variable file names
@@ -227,6 +229,8 @@ def build_dependabot_file(
227229
)
228230
break
229231
except github3.exceptions.NotFoundError:
232+
# The file does not exist and is not required,
233+
# so we should continue to the next one rather than raising error or logging
230234
pass
231235
if "github-actions" not in exempt_ecosystems_list:
232236
try:
@@ -261,6 +265,8 @@ def build_dependabot_file(
261265
)
262266
break
263267
except github3.exceptions.NotFoundError:
268+
# The file does not exist and is not required,
269+
# so we should continue to the next one rather than raising error or logging
264270
pass
265271

266272
if any(package_managers_found.values()):

evergreen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,8 @@ def check_existing_config(repo, filename):
316316
if existing_config.size > 0:
317317
return existing_config
318318
except github3.exceptions.NotFoundError:
319+
# The file does not exist and is not required,
320+
# so we should continue to the next one rather than raising error or logging
319321
pass
320322
return None
321323

0 commit comments

Comments
 (0)