[open-ils-commits] r856 - constrictor/trunk/contrib/evergreen (erickson)
svn at svn.open-ils.org
svn at svn.open-ils.org
Thu Apr 8 14:04:14 EDT 2010
Author: erickson
Date: 2010-04-08 14:04:10 -0400 (Thu, 08 Apr 2010)
New Revision: 856
Modified:
constrictor/trunk/contrib/evergreen/eg_workflow.py
Log:
don't assume response evt is non-null
Modified: constrictor/trunk/contrib/evergreen/eg_workflow.py
===================================================================
--- constrictor/trunk/contrib/evergreen/eg_workflow.py 2010-04-08 18:04:09 UTC (rev 855)
+++ constrictor/trunk/contrib/evergreen/eg_workflow.py 2010-04-08 18:04:10 UTC (rev 856)
@@ -33,11 +33,12 @@
def doRenew(copyBarcode):
evt = eg_tasks.RenewTask().start(copy_barcode=copyBarcode)
- evt_txt = Event.parse_event(evt).text_code
- log_info("Renew(%s) -> %s" % (copyBarcode, evt_txt))
+ if evt:
+ evt_txt = Event.parse_event(evt).text_code
+ log_info("Renew(%s) -> %s" % (copyBarcode, evt_txt))
- if evt_txt == OILS_EVENT_SUCCESS:
- return evt
+ if evt_txt == OILS_EVENT_SUCCESS:
+ return evt
return None
More information about the open-ils-commits
mailing list