patch empty message remaining

This commit is contained in:
Kevin F 2022-05-15 15:52:00 -05:00
parent 87e799ac88
commit fbf11c8a44

View File

@ -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,