fix handle error
This commit is contained in:
parent
0a41ff21f9
commit
2724713988
1 changed files with 2 additions and 2 deletions
4
main.py
4
main.py
|
@ -99,8 +99,8 @@ class Listener(StreamListener):
|
|||
self.api.update_status(status = choice(answer), in_reply_to_status_id = status._json["id"], auto_populate_reply_metadata = True)
|
||||
print(f"{status._json['user']['screen_name']} s'est fait {answer[0]} !")
|
||||
except Exception as error:
|
||||
if error[0]["code"] == 385:
|
||||
error[0]['message'] = "Tweet supprimé ou auteur en privé/bloqué."
|
||||
if error.message[0]["code"] == 385:
|
||||
error.message[0]['message'] = "Tweet supprimé ou auteur en privé/bloqué."
|
||||
print(f"{errorMessage[:-2]} ({error[0]['code']}) ! {error[0]['message']}")
|
||||
else:
|
||||
if keys["VERBOSE"]:
|
||||
|
|
Reference in a new issue