[Zope-CMF] Nasty print in Discussions.py
Chris Withers
chrisw@nipltd.com
Sat, 2 Jun 2001 15:44:51 +0100
This is a multi-part message in MIME format.
------=_NextPart_000_0512_01C0EB7A.F5F38A90
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
...admittedly it should never get called, but it could topple a Zope
instance running disconnected from a shell.
...and besides, print statements in production code suck.
Anyway, the attached patch fixes it :-)
cheers,
Chris
------=_NextPart_000_0512_01C0EB7A.F5F38A90
Content-Type: application/octet-stream;
name="Discussions.py.patch"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="Discussions.py.patch"
--- Discussions.py.original Thu May 17 14:58:14 2001
+++ Discussions.py Sat Jun 02 15:42:48 2001
@@ -243,8 +243,7 @@
while parent and (not size or len(parents) < size):
if parent in parents:
# Paranoia: circular thread
- print self.absolute_url(), "is in a circular thread"
- break
+ raise RuntimeException, "%s is in a circular thread" % =
self.absolute_url()
parents.append(parent)
parent =3D hasattr(parent, 'inReplyTo') and =
parent.inReplyTo()
parents.reverse()
------=_NextPart_000_0512_01C0EB7A.F5F38A90--