From bb74d6ecd0bb8b995e62cec9cec458879df035ca Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 9 Sep 2015 12:12:02 +0200 Subject: [PATCH] Sistemato il buggone. --- royalbot.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/royalbot.py b/royalbot.py index 9192c03e..84da07bd 100644 --- a/royalbot.py +++ b/royalbot.py @@ -151,11 +151,7 @@ while(True): #Aggiorna l'update ID sul file writeFile("lastid.txt", str(data['result'][0]['update_id'] + 1)) #...esiste il messaggio? telegram wtf - try: - data['result'][0]['message']['text'] - except KeyError: - print(data['result'][0]['message']) - else: + if(data['result'][0]['message'] is not None): #Leggi i dati del messaggio msg = data['result'][0]['message'] #Ah, non lo so io!