Commit d66608f59749835f40909a80503eff28fff76ec1
1 parent
dbfe755b5d
Exists in
master
penanganan handle log binary sms
Showing 1 changed file with 4 additions and 1 deletions Side-by-side Diff
main.py
... | ... | @@ -97,7 +97,10 @@ def handleSms(sms): |
97 | 97 | global LAST_REQUEST_ID |
98 | 98 | global LAST_SN |
99 | 99 | |
100 | - logger.info(u'Incoming SMS from: {0}; Time: {1}; Message: {2}'.format(sms.number, sms.time, sms.text)) | |
100 | + try: | |
101 | + logger.info(u'Incoming SMS from: {0}; Time: {1}; Message: {2}'.format(sms.number, sms.time, sms.text)) | |
102 | + except: | |
103 | + logger.info(u'Incoming SMS from: {0}; Time: {1}; Message: BINARY'.format(sms.number, sms.time)) | |
101 | 104 | |
102 | 105 | try: |
103 | 106 | epic_key = 'epic.msgin.gw:' + BASE_CHIPINFO |