comparison roundup/cgi/actions.py @ 2949:3dca84b1a8f5

namespace collisions
author Richard Jones <richard@users.sourceforge.net>
date Tue, 23 Nov 2004 22:45:13 +0000
parents c8ee5907f1e2
children 6dbe3798a4c4 80ecc86dc45d
comparison
equal deleted inserted replaced
2948:deda13909085 2949:3dca84b1a8f5
1 #$Id: actions.py,v 1.39 2004-11-18 17:20:40 a1s Exp $ 1 #$Id: actions.py,v 1.40 2004-11-23 22:45:13 richard Exp $
2 2
3 import re, cgi, StringIO, urllib, Cookie, time, random 3 import re, cgi, StringIO, urllib, Cookie, time, random
4 4
5 from roundup import hyperdb, token, date, password, rcsv, exceptions 5 from roundup import hyperdb, token, date, password, rcsv
6 from roundup.i18n import _ 6 from roundup.i18n import _
7 import roundup.exceptions
7 from roundup.cgi import exceptions, templating 8 from roundup.cgi import exceptions, templating
8 from roundup.mailgw import uidFromAddress 9 from roundup.mailgw import uidFromAddress
9 10
10 __all__ = ['Action', 'ShowAction', 'RetireAction', 'SearchAction', 11 __all__ = ['Action', 'ShowAction', 'RetireAction', 'SearchAction',
11 'EditCSVAction', 'EditItemAction', 'PassResetAction', 12 'EditCSVAction', 'EditItemAction', 'PassResetAction',
520 props, links = self.client.parsePropsFromForm() 521 props, links = self.client.parsePropsFromForm()
521 522
522 # handle the props 523 # handle the props
523 try: 524 try:
524 message = self._editnodes(props, links) 525 message = self._editnodes(props, links)
525 except (ValueError, KeyError, IndexError, exceptions.Reject), message: 526 except (ValueError, KeyError, IndexError,
527 roundup.exceptions.Reject), message:
526 import traceback;traceback.print_exc() 528 import traceback;traceback.print_exc()
527 self.client.error_message.append( 529 self.client.error_message.append(
528 self._('Edit Error: %s') % str(message)) 530 self._('Edit Error: %s') % str(message))
529 return 531 return
530 532
562 564
563 # handle the props - edit or create 565 # handle the props - edit or create
564 try: 566 try:
565 # when it hits the None element, it'll set self.nodeid 567 # when it hits the None element, it'll set self.nodeid
566 messages = self._editnodes(props, links) 568 messages = self._editnodes(props, links)
567 except (ValueError, KeyError, IndexError, exceptions.Reject), message: 569 except (ValueError, KeyError, IndexError,
570 roundup.exceptions.Reject), message:
568 # these errors might just be indicative of user dumbness 571 # these errors might just be indicative of user dumbness
569 self.client.error_message.append(_('Error: %s') % str(message)) 572 self.client.error_message.append(_('Error: %s') % str(message))
570 return 573 return
571 574
572 # commit now that all the tricky stuff is done 575 # commit now that all the tricky stuff is done
751 if self.db.config['INSTANT_REGISTRATION']: 754 if self.db.config['INSTANT_REGISTRATION']:
752 # handle the create now 755 # handle the create now
753 try: 756 try:
754 # when it hits the None element, it'll set self.nodeid 757 # when it hits the None element, it'll set self.nodeid
755 messages = self._editnodes(props, links) 758 messages = self._editnodes(props, links)
756 except (ValueError, KeyError, IndexError, exceptions.Reject), \ 759 except (ValueError, KeyError, IndexError,
757 message: 760 roundup.exceptions.Reject), message:
758 # these errors might just be indicative of user dumbness 761 # these errors might just be indicative of user dumbness
759 self.client.error_message.append(_('Error: %s') % str(message)) 762 self.client.error_message.append(_('Error: %s') % str(message))
760 return 763 return
761 764
762 # fix up the initial roles 765 # fix up the initial roles

Roundup Issue Tracker: http://roundup-tracker.org/