@@ -150,9 +150,23 @@ def main(argv: Optional[Sequence[str]] = None):
150150 try :
151151 print ("Generating partial manifest and catalog from changed files..." , file = sys .stderr )
152152 selected_models , manifest , catalog = generate_partial_manifest_catalog (changed_files , base_path = base_path )
153- print (f"Generated manifest with { len (manifest .get ('nodes' , {}))} nodes" , file = sys .stderr )
153+
154+ # Handle manifest object (could be ManifestV12 or similar)
155+ if hasattr (manifest , "nodes" ):
156+ print (f"Generated manifest with { len (manifest .nodes )} nodes" , file = sys .stderr )
157+ elif hasattr (manifest , "get" ) and callable (manifest .get ):
158+ print (f"Generated manifest with { len (manifest .get ('nodes' , {}))} nodes" , file = sys .stderr )
159+ else :
160+ print (f"Generated manifest object of type: { type (manifest ).__name__ } " , file = sys .stderr )
161+
162+ # Handle catalog object (could be CatalogV1 or similar)
154163 if catalog :
155- print (f"Generated catalog with { len (catalog .get ('nodes' , {}))} nodes" , file = sys .stderr )
164+ if hasattr (catalog , "nodes" ):
165+ print (f"Generated catalog with { len (catalog .nodes )} nodes" , file = sys .stderr )
166+ elif hasattr (catalog , "get" ) and callable (catalog .get ):
167+ print (f"Generated catalog with { len (catalog .get ('nodes' , {}))} nodes" , file = sys .stderr )
168+ else :
169+ print (f"Generated catalog object of type: { type (catalog ).__name__ } " , file = sys .stderr )
156170 else :
157171 print ("No catalog generated (catalog file not available)" , file = sys .stderr )
158172
0 commit comments