1
0
Fork 0
mirror of https://github.com/deltachat/deltachat-core.git synced 2025-10-05 10:39:27 +02:00

some better printing, fixing py35

This commit is contained in:
holger krekel 2018-09-19 12:09:19 +02:00
parent 5914af77c2
commit 0bfa955f9c
4 changed files with 34 additions and 9 deletions

View file

@ -330,6 +330,13 @@ class EventLogger:
if rex.match(ev[0]):
return ev
def get_info_matching(self, regex):
rex = re.compile("(?:{}).*".format(regex))
while 1:
ev = self.get_matching("DC_EVENT_INFO")
if rex.match(ev[2]):
return ev
def _log_event(self, evt_name, data1, data2):
# don't show events that are anyway empty impls now
if evt_name in ("DC_EVENT_GET_STRING", "DC_EVENT_IS_OFFLINE"):