Take out the stupid option of getting out of the program
Since sleekxmpp needs to run as a loop, that was cutting it. Idiot.
This commit is contained in:
parent
e7c1efefe2
commit
9a06e8ac68
|
@ -3,7 +3,6 @@
|
||||||
|
|
||||||
import sleekxmpp
|
import sleekxmpp
|
||||||
import telegram
|
import telegram
|
||||||
import logging
|
|
||||||
import configparser
|
import configparser
|
||||||
from threading import Thread
|
from threading import Thread
|
||||||
from queue import Queue
|
from queue import Queue
|
||||||
|
@ -31,12 +30,9 @@ class EchoBot(sleekxmpp.ClientXMPP):
|
||||||
t = Thread(target=self.read_tg)
|
t = Thread(target=self.read_tg)
|
||||||
t.daemon = True
|
t.daemon = True
|
||||||
t.start()
|
t.start()
|
||||||
print('Please wait a couple of minutes until it\'s correctly connected'
|
|
||||||
' to telegram.')
|
print('Please wait a couple of minutes until it\'s correctly '
|
||||||
while True:
|
'connected')
|
||||||
out = input('Enter "quit" if you want to stop the program.\n')
|
|
||||||
if out == 'quit':
|
|
||||||
exit()
|
|
||||||
|
|
||||||
def read_tg(self):
|
def read_tg(self):
|
||||||
update_id = 0
|
update_id = 0
|
||||||
|
|
Loading…
Reference in New Issue