Re: adduser command: give feedback about success
Marius Gedminas <[email protected]>
| Newsgroups | gmane.comp.web.zope.devel |
|---|---|
| Message-ID | <20110109093209.GB11468@platonas> |
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 _______________________________________________ Zope-Dev maillist - [email protected] https://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - https://mail.zope.org/mailman/listinfo/zope-announce https://mail.zope.org/mailman/listinfo/zope )
signature.asc
(application/pgp-signature, 198 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAk0pgJkACgkQkVdEXeem149PuQCfdWqbvnH5FP2Tx6p819329QV6 kfAAnA9UKLJPXCBqfGK6C/0ZFrXuKoh4 =uZQQ -----END PGP SIGNATURE-----