Omaha #4573 Add exception handling for deserialization errors
Change-Id: I62ca0eec08f5a64e4ef321cb5552a3074bd5446f Former-commit-id: 7d425f9bffd3977087754a0e09edd97e9060135c
This commit is contained in:
parent
7f29a37243
commit
cf2b978592
1 changed files with 11 additions and 7 deletions
|
@ -98,6 +98,7 @@ class GetGfeNotifyTopicListener(threading.Thread):
|
||||||
print "Does not yet support type", t
|
print "Does not yet support type", t
|
||||||
|
|
||||||
def receivedMessage(self, msg):
|
def receivedMessage(self, msg):
|
||||||
|
try:
|
||||||
obj = dynamicserialize.deserialize(msg)
|
obj = dynamicserialize.deserialize(msg)
|
||||||
t = type(obj)
|
t = type(obj)
|
||||||
if t is list:
|
if t is list:
|
||||||
|
@ -105,6 +106,9 @@ class GetGfeNotifyTopicListener(threading.Thread):
|
||||||
self.addMessageToQueue(notification, type(notification))
|
self.addMessageToQueue(notification, type(notification))
|
||||||
else:
|
else:
|
||||||
self.addMessageToQueue(obj, t)
|
self.addMessageToQueue(obj, t)
|
||||||
|
except:
|
||||||
|
import traceback
|
||||||
|
traceback.print_exc()
|
||||||
|
|
||||||
def stop(self):
|
def stop(self):
|
||||||
self.qs.close()
|
self.qs.close()
|
||||||
|
|
Loading…
Add table
Reference in a new issue