From 86ada4352851daece49c89041da98658eaff05bf Mon Sep 17 00:00:00 2001 From: erickson Date: Sun, 26 Apr 2009 18:26:10 +0000 Subject: [PATCH] backporting safer ilsevent handling git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_4@12995 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/python/oils/event.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/python/oils/event.py b/Open-ILS/src/python/oils/event.py index 9d5d3d821c..c87f393724 100644 --- a/Open-ILS/src/python/oils/event.py +++ b/Open-ILS/src/python/oils/event.py @@ -4,7 +4,10 @@ class Event(object): ''' Generic ILS event object ''' def __init__(self, evt_hash={}): - self.code = int(evt_hash['ilsevent']) + try: + self.code = int(evt_hash['ilsevent']) + except: + self.code = -1 self.text_code = evt_hash['textcode'] self.desc = evt_hash.get('desc') or '' self.payload = evt_hash.get('payload') -- 2.11.0