[Zope-Coders] Question about procedures
martin f krafft
madduck at madduck.net
Thu Mar 24 11:05:36 EST 2005
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 at madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus at madduck.net
no cat has eight tails.
a cat has one tail more than no cat.
therefore, a cat has nine tails.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope-coders/attachments/20050324/3a5c2de9/attachment.bin
More information about the Zope-Coders
mailing list