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,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()
|
||||
|
|
Loading…
Add table
Reference in a new issue