# HG changeset patch # User Adrien Di Mascio # Date 1253783210 -7200 # Node ID 8a11aeea4d25cbdadaa82d0ccae23e2fc894aa45 # Parent e4843535db25a792676dd933981ad6acb097b53a# Parent b7621175989a1b28c3a3317ea57ca14bd70fec07 merge diff -r e4843535db25 -r 8a11aeea4d25 entities/wfobjs.py --- a/entities/wfobjs.py Thu Sep 24 00:24:21 2009 +0200 +++ b/entities/wfobjs.py Thu Sep 24 11:06:50 2009 +0200 @@ -452,7 +452,9 @@ """ assert self.current_workflow tr = self.current_workflow.transition_by_name(trname) - assert tr is not None, 'not a %s transition: %s' % (self.__regid__, trname) + if tr is None: + raise WorkflowException('not a %s transition: %s' % (self.__regid__, + trname)) return self._add_trinfo(comment, commentformat, tr.eid) def change_state(self, statename, comment=None, commentformat=None, tr=None):