From 117eccf38b2ed5a096ec77365d95a1a66ec8088d Mon Sep 17 00:00:00 2001 From: overflowerror Date: Mon, 23 Mar 2015 14:41:03 +0100 Subject: [PATCH] i hate exceptions too --- main.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index dac256e..a343398 100644 --- a/main.py +++ b/main.py @@ -139,9 +139,13 @@ if __name__ == "__main__": for username in DESTINATION_ACCOUNTS: text = (username + " " + command + COMMAND_NAME_SEPERATOR + output) 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:] - time.sleep(1) + time.sleep(4) else: api.update_status(status = (command + COMMAND_NAME_SEPERATOR + output))