Mercurial > p > roundup > code
comparison roundup/cgi/client.py @ 1320:3758a5af985f
Lots of little fixes in this update:
- fixed Date.local()
- email quoted text stripping is controllable again [SF#650742]
- extract attachment name from content-disposition if name missing [SF#637278]
- removed FILTER_POSITION from bundled configs
- reverse message listing in issue display (reversion of recent change)
- bad entries for multilink editing in cgi don't traceback now [SF#640310]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 10 Dec 2002 00:11:16 +0000 |
| parents | 62103ced4482 |
| children | 80eef084069a |
comparison
equal
deleted
inserted
replaced
| 1319:f8cc0b724b28 | 1320:3758a5af985f |
|---|---|
| 1 # $Id: client.py,v 1.58 2002-11-28 07:08:39 richard Exp $ | 1 # $Id: client.py,v 1.59 2002-12-10 00:11:15 richard Exp $ |
| 2 | 2 |
| 3 __doc__ = """ | 3 __doc__ = """ |
| 4 WWW request handler (also used in the stand-alone server). | 4 WWW request handler (also used in the stand-alone server). |
| 5 """ | 5 """ |
| 6 | 6 |
| 689 try: | 689 try: |
| 690 # make changes to the node | 690 # make changes to the node |
| 691 props = self._changenode(props) | 691 props = self._changenode(props) |
| 692 # handle linked nodes | 692 # handle linked nodes |
| 693 self._post_editnode(self.nodeid) | 693 self._post_editnode(self.nodeid) |
| 694 except (ValueError, KeyError), message: | 694 except (ValueError, KeyError, IndexError), message: |
| 695 self.error_message.append(_('Error: ') + str(message)) | 695 self.error_message.append(_('Error: ') + str(message)) |
| 696 return | 696 return |
| 697 | 697 |
| 698 # commit now that all the tricky stuff is done | 698 # commit now that all the tricky stuff is done |
| 699 self.db.commit() | 699 self.db.commit() |
| 769 xtra = ' for <a href="%s">%s</a>'%(designator, designator) | 769 xtra = ' for <a href="%s">%s</a>'%(designator, designator) |
| 770 | 770 |
| 771 try: | 771 try: |
| 772 # do the create | 772 # do the create |
| 773 nid = self._createnode(props) | 773 nid = self._createnode(props) |
| 774 | 774 except (ValueError, KeyError, IndexError), message: |
| 775 # these errors might just be indicative of user dumbness | |
| 776 self.error_message.append(_('Error: ') + str(message)) | |
| 777 return | |
| 778 except: | |
| 779 # oops | |
| 780 self.db.rollback() | |
| 781 s = StringIO.StringIO() | |
| 782 traceback.print_exc(None, s) | |
| 783 self.error_message.append('<pre>%s</pre>'%cgi.escape(s.getvalue())) | |
| 784 return | |
| 785 | |
| 786 try: | |
| 775 # handle linked nodes | 787 # handle linked nodes |
| 776 self._post_editnode(nid) | 788 self._post_editnode(nid) |
| 777 | 789 |
| 778 # commit now that all the tricky stuff is done | 790 # commit now that all the tricky stuff is done |
| 779 self.db.commit() | 791 self.db.commit() |
| 781 # render the newly created item | 793 # render the newly created item |
| 782 self.nodeid = nid | 794 self.nodeid = nid |
| 783 | 795 |
| 784 # and some nice feedback for the user | 796 # and some nice feedback for the user |
| 785 message = _('%(classname)s created ok')%self.__dict__ + xtra | 797 message = _('%(classname)s created ok')%self.__dict__ + xtra |
| 786 except (ValueError, KeyError), message: | |
| 787 self.error_message.append(_('Error: ') + str(message)) | |
| 788 return | |
| 789 except: | 798 except: |
| 790 # oops | 799 # oops |
| 791 self.db.rollback() | 800 self.db.rollback() |
| 792 s = StringIO.StringIO() | 801 s = StringIO.StringIO() |
| 793 traceback.print_exc(None, s) | 802 traceback.print_exc(None, s) |
