Try to prevent transwhat from crashing on malformed protobuf

This commit is contained in:
moyamo 2015-09-21 21:45:18 +02:00
parent 29d92b456e
commit a5877bc1a9
2 changed files with 1 additions and 2 deletions

View file

@ -4,7 +4,6 @@ import struct
import sys import sys
import os import os
import logging import logging
import google.protobuf import google.protobuf
def WRAP(MESSAGE, TYPE): def WRAP(MESSAGE, TYPE):

View file

@ -458,7 +458,7 @@ class Session(YowsupApp):
else: else:
room = sender room = sender
try: try:
group = self.groups[room] group = self.groups[self._lengthenGroupId(room)]
self.logger.info("Group Message from %s to %s Groups: %s", self.logger.info("Group Message from %s to %s Groups: %s",
group.nick , group , self.groups) group.nick , group , self.groups)
self.backend.handleMessage( self.backend.handleMessage(