Question about procedures

martin f krafft <[email protected]>
Newsgroups gmane.comp.web.zope.coders
Message-ID <[email protected]>
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?

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):

-- 
martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
 
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: [email protected]
 
no cat has eight tails.
a cat has one tail more than no cat.
therefore, a cat has nine tails.

_______________________________________________
Zope-Coders mailing list
[email protected]
http://mail.zope.org/mailman/listinfo/zope-coders
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (GNU/Linux)

iD8DBQFCQuVQIgvIgzMMSnURAu8FAKCMyqKtPNPugmYExoEbZ9TZigejugCeNnGM
Wjt22MU7D515yJZtX5PtYeI=
=3odz
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.