Improve logging.

This commit is contained in:
Alexandr
2019-05-17 14:21:38 +03:00
parent a6d7903c57
commit a80b915d10
4 changed files with 9 additions and 4 deletions

View File

@ -48,7 +48,7 @@ class MessageWorker:
except ValueError:
pass
try:
if (int(string[1:]) > 0) and (string[0] == '+') and (len(string[1:]) < 3):
if (int(string[1:]) > 0) and (string[0] == '+') and (len(string[1:]) < 4):
return string
except:
pass
@ -222,7 +222,8 @@ class MessageWorker:
print(e)
self.send_img(conf_id)
return True
except:
except Exception as e:
print('ERROR: %s' % e)
return False
try:
text = msg['message']['text']