diff --git a/docs/base.html b/docs/base.html index 123bcaa..672218e 100644 --- a/docs/base.html +++ b/docs/base.html @@ -129,7 +129,11 @@

Module keboola.component.base

if is_sync_action: # sync action expects valid JSON in stdout on success. result_str = process_sync_action_result(result) - sys.stdout.write(result_str) + # handle cases, when there is sync action called from another sync_action + try: + sys.stdout.write(result_str) + except AttributeError: + pass return result @@ -522,7 +526,11 @@

Args

if is_sync_action: # sync action expects valid JSON in stdout on success. result_str = process_sync_action_result(result) - sys.stdout.write(result_str) + # handle cases, when there is sync action called from another sync_action + try: + sys.stdout.write(result_str) + except AttributeError: + pass return result diff --git a/src/keboola/component/base.py b/src/keboola/component/base.py index a05fda5..ec81257 100644 --- a/src/keboola/component/base.py +++ b/src/keboola/component/base.py @@ -101,7 +101,11 @@ def action_wrapper(self, *args, **kwargs): if is_sync_action: # sync action expects valid JSON in stdout on success. result_str = process_sync_action_result(result) - sys.stdout.write(result_str) + # handle cases, when there is sync action called from another sync_action + try: + sys.stdout.write(result_str) + except AttributeError: + pass return result