potix2 commented on a change in pull request #11531:
URL: https://github.com/apache/airflow/pull/11531#discussion_r505808181
##########
File path: airflow/providers/amazon/aws/operators/datasync.py
##########
@@ -307,18 +317,22 @@ def _create_datasync_task(self):
if not self.task_arn:
raise AirflowException("Task could not be created")
self.log.info("Created a Task with TaskArn %s", self.task_arn)
- return self.task_arn
- def _update_datasync_task(self):
+ def _update_datasync_task(self) -> None:
"""Update a AWS DataSyncTask."""
+ if not self.task_arn:
+ return
+
hook = self.get_hook()
self.log.info("Updating TaskArn %s", self.task_arn)
hook.update_task(self.task_arn, **self.update_task_kwargs)
self.log.info("Updated TaskArn %s", self.task_arn)
- return self.task_arn
Review comment:
This returned value is not used anywhere also.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]