Mercurial > p > roundup > code
comparison doc/customizing.txt @ 5248:198b6e810c67
Use Python-3-compatible 'as' syntax for except statements
Many raise statements near these are also fixed.
So are two ivorrect file encoding marks ('utf8'->'utf-8').
| author | Eric S. Raymond <esr@thyrsus.com> |
|---|---|
| date | Thu, 24 Aug 2017 22:21:37 -0400 |
| parents | 15440504fb04 |
| children | cc79c0f1651d |
comparison
equal
deleted
inserted
replaced
| 5247:7f00a47b3559 | 5248:198b6e810c67 |
|---|---|
| 4471 # update the message's recipients list | 4471 # update the message's recipients list |
| 4472 messages.set(msgid, recipients=recipients) | 4472 messages.set(msgid, recipients=recipients) |
| 4473 | 4473 |
| 4474 # send the message | 4474 # send the message |
| 4475 cl.send_message(nodeid, msgid, note, sendto) | 4475 cl.send_message(nodeid, msgid, note, sendto) |
| 4476 except roundupdb.MessageSendError, message: | 4476 except roundupdb.MessageSendError as message: |
| 4477 raise roundupdb.DetectorError, message | 4477 raise roundupdb.DetectorError(message) |
| 4478 | 4478 |
| 4479 Note that this is the standard nosy reaction code, with the small | 4479 Note that this is the standard nosy reaction code, with the small |
| 4480 addition of:: | 4480 addition of:: |
| 4481 | 4481 |
| 4482 # filter out the people on vacation | 4482 # filter out the people on vacation |
| 4923 # source or a privileged process allow the transaction. | 4923 # source or a privileged process allow the transaction. |
| 4924 # Other possible sources: 'email' | 4924 # Other possible sources: 'email' |
| 4925 return | 4925 return |
| 4926 | 4926 |
| 4927 # otherwise raise an error | 4927 # otherwise raise an error |
| 4928 raise Unauthorized, \ | 4928 raise Unauthorized( \ |
| 4929 'Changes to nosy property not allowed via %s for this issue.'%\ | 4929 'Changes to nosy property not allowed via %s for this issue.'%\ |
| 4930 tx_Source | 4930 tx_Source) |
| 4931 | 4931 |
| 4932 def init(db): | 4932 def init(db): |
| 4933 ''' Install restrict_nosy_changes to run after other auditors. | 4933 ''' Install restrict_nosy_changes to run after other auditors. |
| 4934 | 4934 |
| 4935 Allow initial creation email to set nosy. | 4935 Allow initial creation email to set nosy. |
