Permalink
Browse files

fix on infinite loop

  • Loading branch information...
1 parent 75df646 commit b69bab653ad49c39b9a4977f59dd7f620d776f7d @jishnu7 committed Jan 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 sms_attendance.py
View
@@ -241,7 +241,8 @@ def send_one_by_one(previous, pck):
last_user_num += 1
pck.pickling({'last_user': last_user_num})
# In case, message sent to all accounts.
- if last_user_num == previous:
+ if last_user_num == previous or \
+ (last_user_num - 1 == 0 and loop == 1):
return last_user_num
if loop == 2:
return last_user_num

0 comments on commit b69bab6

Please sign in to comment.