i hate exceptions too

This commit is contained in:
overflowerror 2015-03-23 14:41:03 +01:00
parent 837b3b6cc6
commit 117eccf38b

View file

@ -139,9 +139,13 @@ if __name__ == "__main__":
for username in DESTINATION_ACCOUNTS: for username in DESTINATION_ACCOUNTS:
text = (username + " " + command + COMMAND_NAME_SEPERATOR + output) text = (username + " " + command + COMMAND_NAME_SEPERATOR + output)
while len(text) != 0: while len(text) != 0:
api.update_status(status = text[:130]) try:
api.update_status(status = text[:130])
break
execpt:
log("there is an error: " + sys.exc_info()[0])
text = text[130:] text = text[130:]
time.sleep(1) time.sleep(4)
else: else:
api.update_status(status = (command + COMMAND_NAME_SEPERATOR + output)) api.update_status(status = (command + COMMAND_NAME_SEPERATOR + output))