Browse Source

Take out logging. Also, add a exit option

drymer 4 years ago
parent
commit
e7c1efefe2
2 changed files with 8 additions and 8 deletions
  1. 7
    7
      jabbergram.py
  2. 1
    1
      setup.py

+ 7
- 7
jabbergram.py View File

@@ -10,6 +10,7 @@ from queue import Queue
10 10
 from telegram.error import NetworkError, Unauthorized
11 11
 from time import sleep
12 12
 from sys import argv
13
+from sys import exit
13 14
 
14 15
 
15 16
 class EchoBot(sleekxmpp.ClientXMPP):
@@ -30,13 +31,12 @@ class EchoBot(sleekxmpp.ClientXMPP):
30 31
         t = Thread(target=self.read_tg)
31 32
         t.daemon = True
32 33
         t.start()
33
-
34
-        # activar logueo basico
35
-        logging.basicConfig(
36
-            format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
37
-            level=logging.INFO)
38
-
39
-        logger = logging.getLogger(__name__)
34
+        print('Please wait a couple of minutes until it\'s correctly connected'
35
+                ' to telegram.')
36
+        while True:
37
+            out = input('Enter "quit" if you want to stop the program.\n')
38
+            if out == 'quit':
39
+                exit()
40 40
 
41 41
     def read_tg(self):
42 42
         update_id = 0

+ 1
- 1
setup.py View File

@@ -2,7 +2,7 @@
2 2
 
3 3
 from setuptools import setup
4 4
 
5
-VERSION = '0.1.2'
5
+VERSION = '0.1.3'
6 6
 
7 7
 setup(name='jabbergram',
8 8
       version=VERSION,

Loading…
Cancel
Save