From 21cb4c7dc4d5663ffb53687ecb64f48aff6278e2 Mon Sep 17 00:00:00 2001 From: erickson Date: Sun, 26 Apr 2009 18:22:35 +0000 Subject: [PATCH] ilsevent may be present, but null, be safer git-svn-id: svn://svn.open-ils.org/ILS/trunk@12994 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/src/python/oils/event.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Open-ILS/src/python/oils/event.py b/Open-ILS/src/python/oils/event.py index 58ecb19bf1..c87f393724 100644 --- a/Open-ILS/src/python/oils/event.py +++ b/Open-ILS/src/python/oils/event.py @@ -4,9 +4,9 @@ class Event(object): ''' Generic ILS event object ''' def __init__(self, evt_hash={}): - if 'ilsevent' in evt_hash: + try: self.code = int(evt_hash['ilsevent']) - else: + except: self.code = -1 self.text_code = evt_hash['textcode'] self.desc = evt_hash.get('desc') or '' -- 2.43.2