[Zope-CMF] Bug#143449 zope-cmfdefault: errors when upgrading
zope
Dieter Maurer
dieter@handshake.de
Fri, 19 Apr 2002 20:31:21 +0200
--uNBhfBV+YS
Content-Type: text/plain; charset=us-ascii
Content-Description: message body text
Content-Transfer-Encoding: 7bit
Tres Seaver writes:
> On Fri, 19 Apr 2002, Luca - De Whiskey's - De Vitis wrote:
> > I recived this bug report for the zope-cmf Debian GNU/Linux package:
> >
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=143449&repeatmerged=yes
> >
> > I hope the report is clear enough.
> > Any subsequent zope restart does not produce the same errors.
> ...
> "return outside function" is a symptom of trying to compile the
> PythonScript skin methods as though they were Python modules; the
> setup is (mistakenly) trying this because the skin methods are
> sourced from files whose extension is ".py".
I solved this problem with a little patch to "inst/compilezpy.py" (attached).
Dieter
--uNBhfBV+YS
Content-Type: application/x-patch
Content-Description: Patch preventing Python compilation to enter skins
Content-Disposition: attachment;
filename="comp.pat"
Content-Transfer-Encoding: base64
LS0tIGNvbXBpbGV6cHkucHl+CVNhdCBKYW4gMjYgMTY6MTM6NDEgMjAwMgorKysgY29tcGls
ZXpweS5weQlTYXQgSmFuIDI2IDE3OjQyOjUxIDIwMDIKQEAgLTM1LDcgKzM1LDcgQEAKICAg
ICAgICAgZnVsbG5hbWUgPSBvcy5wYXRoLmpvaW4oZGlyLCBuYW1lKQogICAgICAgICBpZiAo
bmFtZSAhPSBvcy5jdXJkaXIgYW5kIG5hbWUgIT0gb3MucGFyZGlyIGFuZAogICAgICAgICAg
ICAgb3MucGF0aC5pc2RpcihmdWxsbmFtZSkgYW5kIG5vdCBvcy5wYXRoLmlzbGluayhmdWxs
bmFtZSkgYW5kCi0gICAgICAgICAgICBuYW1lICE9ICd0ZXN0JyBhbmQgbmFtZSAhPSAndGVz
dHMnKToKKyAgICAgICAgICAgIG5hbWUgIT0gJ3Rlc3QnIGFuZCBuYW1lICE9ICd0ZXN0cycg
YW5kIG5hbWUgIT0gJ3NraW5zJyApOgogICAgICAgICAgICAgc3VjY2VzcyA9IHN1Y2Nlc3Mg
YW5kIGNvbXBpbGVfbm9uX3Rlc3QoZnVsbG5hbWUpCiAgICAgcmV0dXJuIHN1Y2Nlc3MKIAo=
--uNBhfBV+YS--