mirror of
https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge.git
synced 2026-08-29 16:40:32 +08:00
Merge pull request #16 from SanteeMarcel/handle-zero-fetched-files
Raise zero files fetched error before proceeding
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user