
tseaver at zope
Mar 24, 2005, 8:44 AM
Post #4 of 8
(1873 views)
Permalink
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 martin f krafft wrote: | Dear coders, | | I am new; I just got my account today and am thus a little shakey | wrt policies and such. Thus, let me ask you with respect to | a specific example whether I can just commit to the trunk like that: | | The following patch is a follow-up to the one I submitted to the | collector yesterday (331). Am I allowed to commit patches of this | nature "just like that" (given proper testing and the like), or | should these be discussed up front and/or committed to my own branch | instead? Depends. If you are fixing an obvious typo, then go ahead and commit, after ensuring that all tests pass. If you are changing behavior in a non-backwards-compatible way (which the first part of your patch does), then you likely need either a collector issue (to document the rationale), or some discussion / consensus on the list, which might then result in a collector issue. The right list for CMF-specific changes is the zope-cmf list (there is no separate 'dev' list for CMF). | Index: TypesTool.py | =================================================================== | RCS file: /cvs-repository/Products/CMFCore/TypesTool.py,v | retrieving revision 1.85 | diff -u -r1.85 TypesTool.py | --- TypesTool.py 23 Mar 2005 21:56:09 -0000 1.85 | +++ TypesTool.py 24 Mar 2005 15:56:08 -0000 | @@ -862,12 +862,14 @@ | | ob = info.constructInstance(container, id, *args, **kw) | | - if RESPONSE is not None: | + if RESPONSE is not None and ob: | + if not hasattr(ob, 'absolute_url'): | + raise TypeError('constructInstance did not return a CMF object.') | immediate_url = '%s/%s' % ( ob.absolute_url() | , info.immediate_view ) | RESPONSE.redirect( immediate_url ) | | - return ob.getId() | + return getattr(ob, 'id', None) | | security.declarePrivate( 'listActions' ) | def listActions(self, info=None, object=None): | Tres. - -- =============================================================== Tres Seaver tseaver [at] zope Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCQu6KGqWXf00rNCgRAo/HAKCU4jTMmIRC9Oc3nvY/Be/tNVwatgCcCF0w XSaQekYrk3pNc0ybN1AUrGc= =dKdU -----END PGP SIGNATURE----- _______________________________________________ Zope-Coders mailing list Zope-Coders [at] zope http://mail.zope.org/mailman/listinfo/zope-coders
|