[Zope-dev] Very minor bugfix suggestion. Strip role names
Paul Winkler
pw_lists at slinkp.com
Thu Apr 6 12:49:01 EDT 2006
+1, I've made similar mistakes, very very frustrating.
On Thu, Apr 06, 2006 at 06:31:39PM +0200, Lennart Regebro wrote:
> When adding new rols through the ZMI it is easy to accidentaly let
> trailing or leading spaces stay in the role name, especially if you
> cut and paste. Debugging that is very annoying because that leading
> and trailing space is not visible anywhere.
>
> So, I suggest to just add a .strip() like so (This is in Roles.py):
> def manage_defined_roles(self, submit=None, REQUEST=None):
> """Called by management screen.
> """
>
> if submit=='Add Role':
> role=reqattr(REQUEST, 'role')
> return self._addRole(role.strip(), REQUEST)
>
>
> --
> Lennart Regebro, Nuxeo http://www.nuxeo.com/
> CPS Content Management http://www.cps-project.org/
> _______________________________________________
> Zope-Dev maillist - Zope-Dev at zope.org
> http://mail.zope.org/mailman/listinfo/zope-dev
> ** No cross posts or HTML encoding! **
> (Related lists -
> http://mail.zope.org/mailman/listinfo/zope-announce
> http://mail.zope.org/mailman/listinfo/zope )
--
Paul Winkler
http://www.slinkp.com
More information about the Zope-Dev
mailing list