We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afe1732 commit 36f0613Copy full SHA for 36f0613
src/update_commit.py
@@ -19,7 +19,6 @@
19
month = today.strftime("%b") # Get current month (e.g., Nov)
20
21
# Generate the filename based on the day of the month (e.g., 06(Nov) Root to leaf paths sum.md)
22
- # The name structure might differ but should follow a predictable pattern
23
today_solution_filename = f"{day_of_month}({month})" # The pattern that matches the filename format.
24
25
# Make a request to GitHub to list files in the directory
@@ -32,6 +31,11 @@
32
31
33
files = response.json()
34
+ # Check if files are empty or response is not valid
35
+ if isinstance(files, dict) and files.get('message') == 'Not Found':
36
+ print(f"Directory not found: {dir_url}")
37
+ sys.exit(1)
38
+
39
# Search for the correct file based on the date
40
today_file = None
41
for file in files:
0 commit comments