mirror of
https://github.com/aljazceru/Tutorial-Codebase-Knowledge.git
synced 2025-12-18 15:04:20 +01:00
Raise zero files fetched error before proceeding
This commit is contained in:
2
nodes.py
2
nodes.py
@@ -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