Raise zero files fetched error before proceeding

This commit is contained in:
Marcel Santee
2025-04-19 22:08:54 -03:00
committed by GitHub
parent 08b2cade4f
commit ae49c7cedc

View File

@@ -66,6 +66,8 @@ class FetchRepo(Node):
# Convert dict to list of tuples: [(path, content), ...] # Convert dict to list of tuples: [(path, content), ...]
files_list = list(result.get("files", {}).items()) files_list = list(result.get("files", {}).items())
if len(files_list) == 0:
raise(ValueError("Failed to fetch files"))
print(f"Fetched {len(files_list)} files.") print(f"Fetched {len(files_list)} files.")
return files_list return files_list