Skip to content

Commit

Permalink
Merge pull request #482 from michaeltoop/sms_logger_fix
Browse files Browse the repository at this point in the history
Fixed logger to acomodate submit_sm_resp_bill and submit_sm_bill
  • Loading branch information
farirat committed Oct 6, 2016
2 parents a13c729 + 492a3d5 commit 30e1b21
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/scripts/sms_logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ def gotConnection(conn, username, password):
pdu = pickle.loads(msg.content.body)
pdu_count = 1
short_message = pdu.params['short_message']
submit_sm_bill = pickle.loads(props['headers']['submit_sm_resp_bill'])
billing = props['headers']
billing_pickle = billing.get('submit_sm_resp_bill')
if not billing_pickle:
billing_pickle = billing.get('submit_sm_bill')
submit_sm_bill = pickle.loads(billing_pickle)
source_connector = props['headers']['source_connector']
routed_cid = msg.routing_key[10:]

Expand Down

0 comments on commit 30e1b21

Please sign in to comment.