1. Matthew Schinckel
  2. django-sms-gateway

Commits

Matthew Schinckel  committed a50f1dc

Remove any leading or trailing whitespace when getting the gateway message id.

  • Participants
  • Parent commits 48a603e
  • Branches default

Comments (0)

Files changed (1)

File sms/models/gateway.py

View file
  • Ignore whitespace
             message.status_message = status_msg.split(': ')[1]
         else:
             message.status = "Sent"
-            message.gateway_message_id = re.match(self.success_format, status_msg).groupdict()['gateway_message_id']
+            message.gateway_message_id = re.match(self.success_format, status_msg).groupdict()['gateway_message_id'].strip()
             logging.debug("Gateway MSG ID %s" % message.gateway_message_id)
             message.send_date = datetime.datetime.now()