[ZCM] [ZC] 2066/ 1 Request "Unicode sent into ZPythonScript_edit"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Sat Apr 8 07:20:56 EDT 2006


Issue #2066 Update (Request) "Unicode sent into ZPythonScript_edit"
 Status Pending, Zope/bug+solution medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2066

==============================================================
= Request - Entry #1 by Anonymous User on Apr 8, 2006 7:20 am

Hi all,

I begin to use boa-constructor to edit Zope content, especially Python scripts.
I encountered an exception saying that the "body" object doesn't have the attribute "read()".
It occured in the file /usr/lib/zope/lib/python/Products/PythonScripts/PythonScript.py in the procedure ZPythonScript_edit on the line 149.

I propose a change on the line 148, which stands like:

####################################
if type(body) is not type(''):
####################################

to this code:

####################################
if  type(body) is not type('')\
and type(body) is not type(u''):
####################################

- just for the procedure to accept an unicode object, which was my case.

Thank you all for the great project called Zope.

Cigydd
==============================================================



More information about the Zope-Collector-Monitor mailing list