patch empty message remaining
This commit is contained in:
parent
87e799ac88
commit
fbf11c8a44
@ -22,10 +22,10 @@ class SMSCounter(object):
|
|||||||
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
|
||||||
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79,
|
||||||
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 95, 97, 98, 99,
|
80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 92, 95, 97, 98, 99,
|
||||||
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112,
|
||||||
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 161, 163, 164,
|
113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 161, 163, 164,
|
||||||
165, 191, 196, 197, 198, 199, 201, 209, 214, 216, 220, 223, 224,
|
165, 191, 196, 197, 198, 199, 201, 209, 214, 216, 220, 223, 224,
|
||||||
228, 229, 230, 232, 233, 236, 241, 242, 246, 248, 249, 252, 915,
|
228, 229, 230, 232, 233, 236, 241, 242, 246, 248, 249, 252, 915,
|
||||||
916, 920, 923, 926, 928, 931, 934, 936, 937]
|
916, 920, 923, 926, 928, 931, 934, 936, 937]
|
||||||
return gsm_7bit_map
|
return gsm_7bit_map
|
||||||
|
|
||||||
@ -84,7 +84,11 @@ class SMSCounter(object):
|
|||||||
# and then convert the ceil result to int
|
# and then convert the ceil result to int
|
||||||
# since python 2.7 return a float
|
# since python 2.7 return a float
|
||||||
messages = int(ceil(length / float(permessage)))
|
messages = int(ceil(length / float(permessage)))
|
||||||
remaining = (permessage * messages) - length
|
|
||||||
|
if length == 0:
|
||||||
|
remaining = permessage
|
||||||
|
else:
|
||||||
|
remaining = (permessage * messages) - length
|
||||||
|
|
||||||
returnset = {
|
returnset = {
|
||||||
'encoding': encoding,
|
'encoding': encoding,
|
||||||
|
Loading…
Reference in New Issue
Block a user