Skip to content

Commit

Permalink
SDK/Components/Python - Improved Python2 compatibility (#718)
Browse files Browse the repository at this point in the history
Improved Python2 compatibility in Lightweight python components
  • Loading branch information
Ark-kun authored and k8s-ci-robot committed Jan 24, 2019
1 parent 5beffef commit 32475bf
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions sdk/python/kfp/components/_python_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,7 @@ def annotation_to_type_struct(annotation):
_outputs = {func_name}(**_args)
from collections.abc import Sequence
if not isinstance(_outputs, Sequence) or isinstance(_outputs, str):
if not hasattr(_outputs, '__getitem__') or isinstance(_outputs, str):
_outputs = [_outputs]
from pathlib import Path
Expand Down

0 comments on commit 32475bf

Please sign in to comment.