diff --git a/ssm/ssm2.py b/ssm/ssm2.py index 7c7d2df7..d4b96bb4 100644 --- a/ssm/ssm2.py +++ b/ssm/ssm2.py @@ -37,7 +37,7 @@ from logging import getLogger, INFO, WARNING, DEBUG try: - from argo_ams_library import ArgoMessagingService, AmsMessage, AmsServiceException + from argo_ams_library import AmsMessage, ArgoMessagingService, AmsServiceException except ImportError: # ImportError is raised later on if AMS is requested but lib not installed. ArgoMessagingService = None @@ -494,8 +494,8 @@ def send_all(self): log_string = "Sent %s" % msgid elif self._protocol == Ssm2.AMS_MESSAGING: + # Then we are sending to an Argo Messaging Service instance. try: - # Then we are sending to an Argo Messaging Service instance. argo_id = self._send_msg_ams(text, msgid) log_string = "Sent %s, Argo ID: %s" % (msgid, argo_id) @@ -504,7 +504,7 @@ def send_all(self): if "Message size is too large" not in str(e): raise else: - log.warn('Message %s could not be sent as its larger than 1MB', msgid) + log.warning('Message %s could not be sent as its larger than 1MB', msgid) # Add the message to the rejected queue name = self._rejectq.add(text)