[Zope-dev] adduser command: give feedback about success
Marius Gedminas
marius at gedmin.as
Sun Jan 9 04:32:09 EST 2011
On Fri, Jan 07, 2011 at 11:55:53PM +0100, Maurits van Rees wrote:
> I propose to add this feedback. This needs a few simple changes in
> Zope2/utilities, Zope2/Startup, AccessControl,
> Products.PluggableAuthService, and a few doctest fixes in Products.Five.
> The change to Zope2/utilities/adduser.py would be this:
>
> ===================================================================
> - adduser(app, user, pwd)
> + result = adduser(app, user, pwd)
> + if result:
> + print "User %s created." % user
> + else:
> + print "Got no result back. User creation may have failed."
> + print "Maybe the user already exists and nothing is done then."
> + print "Or the implementation does not give info when it succeeds."
I don't suppose you could somehow change the API so the script can
report something useful? "I don't even know if I succeeded or not"
sounds pretty pathetic.
Maybe it's better than surly silence.
Marius Gedminas
--
http://pov.lt/ -- Zope 3/BlueBream consulting and development
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110109/063bcff2/attachment.bin
More information about the Zope-Dev
mailing list