ashb commented on a change in pull request #20353:
URL: https://github.com/apache/airflow/pull/20353#discussion_r770967315



##########
File path: airflow/providers/amazon/aws/hooks/eks.py
##########
@@ -360,14 +360,19 @@ def get_cluster_state(self, clusterName: str) -> 
ClusterStates:
         :rtype: ClusterStates
         """
         eks_client = self.conn
+        result = None
 
         try:
-            return 
ClusterStates(eks_client.describe_cluster(name=clusterName).get('cluster').get('status'))
+            result = 
ClusterStates(eks_client.describe_cluster(name=clusterName).get('cluster').get('status'))
         except ClientError as ex:
             if ex.response.get("Error").get("Code") == 
"ResourceNotFoundException":
-                return ClusterStates.NONEXISTENT
+                result = ClusterStates.NONEXISTENT

Review comment:
       Oh, we are missing an `else: raise` -- that was the case that didn't 
have a return.




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to