nuclearpinguin commented on a change in pull request #6898: [AIRFLOW-6432] fix
EmrAddStepsOperator broken ref & faulty test & add test case for missing cluster
URL: https://github.com/apache/airflow/pull/6898#discussion_r361807897
##########
File path: airflow/contrib/hooks/emr_hook.py
##########
@@ -51,11 +51,12 @@ def get_cluster_id_by_name(self, emr_cluster_name,
cluster_states):
if len(matching_clusters) == 1:
cluster_id = matching_clusters[0]['Id']
- self.log.info('Found cluster name = %s id = %s' %
(emr_cluster_name, cluster_id))
+ self.log.info(f'Found cluster name = {emr_cluster_name} id =
{cluster_id}')
return cluster_id
elif len(matching_clusters) > 1:
- raise AirflowException('More than one cluster found for name = %s'
% emr_cluster_name)
+ raise AirflowException(f'More than one cluster found for name
{emr_cluster_name}')
Review comment:
```suggestion
raise AirflowException('More than one cluster found for name
%s', emr_cluster_name)
```
----------------------------------------------------------------
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]
With regards,
Apache Git Services