Omaha #4573 Add exception handling for deserialization errors

Change-Id: I62ca0eec08f5a64e4ef321cb5552a3074bd5446f

Former-commit-id: 7d425f9bffd3977087754a0e09edd97e9060135c
This commit is contained in:
Ron Anderson 2015-06-25 13:35:10 -05:00
parent 7f29a37243
commit cf2b978592

View file

@ -98,13 +98,17 @@ class GetGfeNotifyTopicListener(threading.Thread):
print "Does not yet support type", t
def receivedMessage(self, msg):
obj = dynamicserialize.deserialize(msg)
t = type(obj)
if t is list:
for notification in obj:
self.addMessageToQueue(notification, type(notification))
else:
self.addMessageToQueue(obj, t)
try:
obj = dynamicserialize.deserialize(msg)
t = type(obj)
if t is list:
for notification in obj:
self.addMessageToQueue(notification, type(notification))
else:
self.addMessageToQueue(obj, t)
except:
import traceback
traceback.print_exc()
def stop(self):
self.qs.close()