patch empty message remaining
This commit is contained in:
parent
87e799ac88
commit
fbf11c8a44
@ -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