You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2020/02/18 10:59:27 UTC

[GitHub] [airflow] feluelle commented on a change in pull request #7451: [AIRFLOW-6830] Add Subject/MessageAttributes to SNS hook and operator

feluelle commented on a change in pull request #7451: [AIRFLOW-6830] Add Subject/MessageAttributes to SNS hook and operator
URL: https://github.com/apache/airflow/pull/7451#discussion_r380593600
 
 

 ##########
 File path: airflow/providers/amazon/aws/hooks/sns.py
 ##########
 @@ -24,6 +24,20 @@
 from airflow.providers.amazon.aws.hooks.base_aws import AwsBaseHook
 
 
+def _get_message_attribute(o):
+    if isinstance(o, bytes):
+        return {'DataType': 'Binary', 'BinaryValue': o}
+    elif isinstance(o, str):
+        return {'DataType': 'String', 'StringValue': o}
+    elif isinstance(o, (int, float)):
 
 Review comment:
   ```suggestion
       if isinstance(o, (int, float)):
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services