mirror of
https://github.com/sigmasternchen/MinervaBot
synced 2025-03-15 07:59:00 +00:00
i hate exceptions too
This commit is contained in:
parent
837b3b6cc6
commit
117eccf38b
1 changed files with 6 additions and 2 deletions
8
main.py
8
main.py
|
@ -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))
|
||||||
|
|
Loading…
Reference in a new issue