From f21e855476bd48b064e0a2c9034510276bdf0680 Mon Sep 17 00:00:00 2001 From: overflowerror Date: Mon, 23 Mar 2015 14:43:56 +0100 Subject: [PATCH] if, else, ... it's all the same --- main.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index ebd5d0a..f3294c2 100644 --- a/main.py +++ b/main.py @@ -148,7 +148,15 @@ if __name__ == "__main__": time.sleep(4) else: - api.update_status(status = (command + COMMAND_NAME_SEPERATOR + output)) + text = (username + " " + command + COMMAND_NAME_SEPERATOR + output) + while len(text) != 0: + try: + api.update_status(status = text[:130]) + break + except: + log("there is an error: " + sys.exc_info()[0]) + text = text[130:] + time.sleep(1) if counter % 3 == 0: