[open-ils-commits] r8426 - trunk/Open-ILS/src/python/oils
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Jan 18 17:28:10 EST 2008
Author: erickson
Date: 2008-01-18 17:02:19 -0500 (Fri, 18 Jan 2008)
New Revision: 8426
Modified:
trunk/Open-ILS/src/python/oils/event.py
Log:
repaired logic error in reading event status. assuming existance of code and textcode
Modified: trunk/Open-ILS/src/python/oils/event.py
===================================================================
--- trunk/Open-ILS/src/python/oils/event.py 2008-01-18 21:24:59 UTC (rev 8425)
+++ trunk/Open-ILS/src/python/oils/event.py 2008-01-18 22:02:19 UTC (rev 8426)
@@ -5,15 +5,15 @@
def __init__(self, evt_hash={}):
- self.code = evt_hash.get('ilsevent') or -1
- self.text_code = evt_hash.get('textcode') or ''
+ self.code = int(evt_hash['ilsevent'])
+ self.text_code = evt_hash['textcode']
self.desc = evt_hash.get('desc') or ''
- self.payload = evt_hash.get('payload') or None
+ self.payload = evt_hash.get('payload')
self.debug = evt_hash.get('stacktrace') or ''
self.servertime = evt_hash.get('servertime') or ''
self.success = False
- if self.code == int(0):
+ if self.code == 0:
self.success = True
def __str__(self):
More information about the open-ils-commits
mailing list