Skip to content

Commit e266757

Browse files
committed
Reorder imports, move comment, use logging.warning
- Reorder argo_ams_library imports alphabetically. - Move comment to more logical position. - Change logging.warn to .warning as former is deprecating.
1 parent bda9e02 commit e266757

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ssm/ssm2.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
from logging import getLogger, INFO, WARNING, DEBUG
3838

3939
try:
40-
from argo_ams_library import ArgoMessagingService, AmsMessage, AmsServiceException
40+
from argo_ams_library import AmsMessage, ArgoMessagingService, AmsServiceException
4141
except ImportError:
4242
# ImportError is raised later on if AMS is requested but lib not installed.
4343
ArgoMessagingService = None
@@ -494,8 +494,8 @@ def send_all(self):
494494
log_string = "Sent %s" % msgid
495495

496496
elif self._protocol == Ssm2.AMS_MESSAGING:
497+
# Then we are sending to an Argo Messaging Service instance.
497498
try:
498-
# Then we are sending to an Argo Messaging Service instance.
499499
argo_id = self._send_msg_ams(text, msgid)
500500
log_string = "Sent %s, Argo ID: %s" % (msgid, argo_id)
501501

@@ -504,7 +504,7 @@ def send_all(self):
504504
if "Message size is too large" not in str(e):
505505
raise
506506
else:
507-
log.warn('Message %s could not be sent as its larger than 1MB', msgid)
507+
log.warning('Message %s could not be sent as its larger than 1MB', msgid)
508508

509509
# Add the message to the rejected queue
510510
name = self._rejectq.add(text)

0 commit comments

Comments
 (0)