Skip to content

Commit

Permalink
SDK - Components - Only yaml component files can be used as source
Browse files Browse the repository at this point in the history
Previously, if the file was a .zip archive, some functions like exception printing would fail as it's not a text file.
  • Loading branch information
Ark-kun committed Aug 27, 2019
1 parent d043d16 commit 475ae4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sdk/python/kfp/components/_components.py
Original file line number Diff line number Diff line change
Expand Up @@ -270,5 +270,5 @@ def component_default_to_func_default(component_default: str, is_optional: bool)
factory_function_parameters,
documentation='\n'.join(func_docstring_lines),
func_name=name,
func_filename=component_filename
func_filename=component_filename if (component_filename and component_filename.endswith('.yaml')) else None,
)

0 comments on commit 475ae4a

Please sign in to comment.