Changeset 6588 for main/waeup.sirp/trunk
- Timestamp:
- 10 Aug 2011, 21:59:28 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/accesscodes/accesscodes.py
r6587 r6588 460 460 batch_id, ac_id = access_code.rsplit('-', 1) 461 461 except ValueError: 462 return False 462 raise ValueError( 463 'Invalid access code format: %s (use: APP-N-XXXXXXXX)' % ( 464 access_code,)) 463 465 try: 464 466 ac = grok.getSite()['accesscodes'][batch_id].getAccessCode(access_code) 465 except: 466 return False 467 except TypeError: 468 raise KeyError( 469 'No site available for looking up accesscodes') 467 470 info = IWorkflowInfo(ac) 468 471 if toward: … … 483 486 meanings. 484 487 """ 485 return fire_transition(access_code, 'use', comment=comment) 488 try: 489 fire_transition(access_code, 'use', comment=comment) 490 return True 491 except: 492 return False 486 493 487 494 def disable_accesscode(access_code, comment=None):
Note: See TracChangeset for help on using the changeset viewer.