1. Matthew Schinckel
  2. django-sms-gateway
  3. Issues
Issue #6 resolved

logging line while gateway sends doesnt' handle no gateway_message_id case

created an issue

line 181 of models/gateway.py causes an exception if message.gateway_message_id is None

I got round this by using the following:

        logging.debug("Gateway MSG ID %s [%i]" % (message.gateway_message_id, message.gateway_message_id is None or len(message.gateway_message_id)))

I tried forking and creating a patch, but bitbucket failed...

Comments (5)

  1. maxgatedigital reporter

    i think it was along the lines of len[gateway_message_id] isn't possible for type None.

    It's unguarded - causes an exception which in debug mode upset the gateway (it always wants a specific numeric response, and can't cope with a django exception page - i'm in debug mode...)

  2. Log in to comment