[Checkins] SVN: grokui.admin/trunk/src/grokui/admin/views.py Fix https://bugs.launchpad.net/grok/+bug/638763.
Uli Fouquet
uli at gnufix.de
Wed Sep 15 05:51:13 EDT 2010
Log message for revision 116432:
Fix https://bugs.launchpad.net/grok/+bug/638763.
Don't hide away Duplication/KeyErrors that come from the new
application itself.
Changed:
U grokui.admin/trunk/src/grokui/admin/views.py
-=-
Modified: grokui.admin/trunk/src/grokui/admin/views.py
===================================================================
--- grokui.admin/trunk/src/grokui/admin/views.py 2010-09-15 09:48:44 UTC (rev 116431)
+++ grokui.admin/trunk/src/grokui/admin/views.py 2010-09-15 09:51:13 UTC (rev 116432)
@@ -71,12 +71,12 @@
self.redirect(self.url(self.context, 'applications'))
return
app = getUtility(grok.interfaces.IApplication, name=application)
- try:
+ if name in self.context.root.keys():
+ self.flash(u'Name `%s` already in use. '
+ u'Please choose another name.' % (name,))
+ else:
new_app = create_application(app, self.context.root, name)
self.flash(u'Added %s `%s`.' % (application, name))
- except (DuplicationError, KeyError):
- self.flash(u'Name `%s` already in use. '
- u'Please choose another name.' % (name,))
self.redirect(self.url(self.context, 'applications'))
More information about the checkins
mailing list