[open-ils-commits] r8668 -
branches/acq-experiment/Open-ILS/src/python/oils
svn at svn.open-ils.org
svn at svn.open-ils.org
Wed Feb 6 13:22:56 EST 2008
Author: erickson
Date: 2008-02-06 12:54:28 -0500 (Wed, 06 Feb 2008)
New Revision: 8668
Modified:
branches/acq-experiment/Open-ILS/src/python/oils/event.py
Log:
porting over permission failure vars
Modified: branches/acq-experiment/Open-ILS/src/python/oils/event.py
===================================================================
--- branches/acq-experiment/Open-ILS/src/python/oils/event.py 2008-02-06 17:53:33 UTC (rev 8667)
+++ branches/acq-experiment/Open-ILS/src/python/oils/event.py 2008-02-06 17:54:28 UTC (rev 8668)
@@ -3,7 +3,6 @@
class Event(object):
''' Generic ILS event object '''
-
def __init__(self, evt_hash={}):
self.code = int(evt_hash['ilsevent'])
self.text_code = evt_hash['textcode']
@@ -11,14 +10,20 @@
self.payload = evt_hash.get('payload')
self.debug = evt_hash.get('stacktrace') or ''
self.servertime = evt_hash.get('servertime') or ''
+ self.ilsperm = evt_hash.get('ilsperm')
+ self.ilspermloc = evt_hash.get('ilspermloc')
self.success = False
if self.code == 0:
self.success = True
def __str__(self):
- return '%s: %s:%s -> %s' % (
- self.__class__.__name__, self.code, self.text_code, self.desc)
+ if self.ilsperm:
+ return '%s: %s:%s -> %s %s@%s' % (
+ self.__class__.__name__, self.code, self.text_code, self.desc, self.ilsperm, str(self.ilspermloc))
+ else:
+ return '%s: %s:%s -> %s' % (
+ self.__class__.__name__, self.code, self.text_code, self.desc)
# XXX eventually, add events file parsing...
More information about the open-ils-commits
mailing list