[open-ils-commits] r12993 - trunk/Open-ILS/src/python/oils (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Sun Apr 26 13:42:32 EDT 2009
Author: erickson
Date: 2009-04-26 13:42:29 -0400 (Sun, 26 Apr 2009)
New Revision: 12993
Modified:
trunk/Open-ILS/src/python/oils/event.py
Log:
don't assume the existence event code number
Modified: trunk/Open-ILS/src/python/oils/event.py
===================================================================
--- trunk/Open-ILS/src/python/oils/event.py 2009-04-26 15:21:03 UTC (rev 12992)
+++ trunk/Open-ILS/src/python/oils/event.py 2009-04-26 17:42:29 UTC (rev 12993)
@@ -4,7 +4,10 @@
''' Generic ILS event object '''
def __init__(self, evt_hash={}):
- self.code = int(evt_hash['ilsevent'])
+ if 'ilsevent' in evt_hash:
+ self.code = int(evt_hash['ilsevent'])
+ else:
+ self.code = -1
self.text_code = evt_hash['textcode']
self.desc = evt_hash.get('desc') or ''
self.payload = evt_hash.get('payload')
More information about the open-ils-commits
mailing list