Skip to content

Commit

Permalink
Remove a few unnecessary things.
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith committed Oct 15, 2013
1 parent 78cb28d commit afe7654
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions vumi/transports/mtech_kenya/mtech_kenya.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,6 @@ class MTechKenyaTransport(HttpRpcTransport):
403: 'Invalid mobile number',
}

def validate_config(self):
config = self.get_static_config()
self._credentials = {
'user': config.mt_username,
'pass': config.mt_password,
}
self._outbound_url = config.outbound_url
return super(MTechKenyaTransport, self).validate_config()

@inlineCallbacks
def handle_outbound_message(self, message):
config = self.get_static_config()
Expand All @@ -57,8 +48,7 @@ def handle_outbound_message(self, message):
'MSISDN': message['to_addr'],
'MESSAGE': message['content'],
}
log.msg("Sending outbound message: %s" % (message,))
url = '%s?%s' % (self._outbound_url, urlencode(params))
url = '%s?%s' % (config.outbound_url, urlencode(params))
log.msg("Making HTTP request: %s" % (url,))
response = yield http_request_full(url, '', method='POST')
log.msg("Response: (%s) %r" % (response.code, response.delivered_body))
Expand All @@ -85,7 +75,6 @@ def handle_raw_inbound_message(self, message_id, request):
content=values['MESSAGE'],
to_addr=values['shortCode'],
from_addr=values['MSISDN'],
provider='vumi',
transport_type=self.transport_type,
transport_metadata={'transport_message_id': values['messageID']},
)
Expand Down

0 comments on commit afe7654

Please sign in to comment.