Skip to content

Commit 55af272

Browse files
committed
fix: comment when an empty except occurs explaining why no action is taken
Signed-off-by: Zack Koppert <[email protected]>
1 parent ea3d489 commit 55af272

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
@@ -165,6 +165,8 @@ def build_dependabot_file(
165165
)
166166
break
167167
except github3.exceptions.NotFoundError:
168+
# The file does not exist and is not required,
169+
# so we should continue to the next one rather than raising error or logging
168170
pass
169171

170172
# detect package managers with variable file names
@@ -183,6 +185,8 @@ def build_dependabot_file(
183185
)
184186
break
185187
except github3.exceptions.NotFoundError:
188+
# The file does not exist and is not required,
189+
# so we should continue to the next one rather than raising error or logging
186190
pass
187191
if "github-actions" not in exempt_ecosystems_list:
188192
try:
@@ -199,6 +203,8 @@ def build_dependabot_file(
199203
)
200204
break
201205
except github3.exceptions.NotFoundError:
206+
# The file does not exist and is not required,
207+
# so we should continue to the next one rather than raising error or logging
202208
pass
203209

204210
if any(package_managers_found.values()):

evergreen.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,8 @@ def check_existing_config(repo, filename):
243243
if existing_config.size > 0:
244244
return existing_config
245245
except github3.exceptions.NotFoundError:
246+
# The file does not exist and is not required,
247+
# so we should continue to the next one rather than raising error or logging
246248
pass
247249
return None
248250

0 commit comments

Comments
 (0)