[Zope-dev] BUGFIX XMLDocument upload tab
Martijn Faassen
M.Faassen@vet.uu.nl
Mon, 26 Jul 1999 13:14:43 +0200
Hi there, zope-dev people and Amos,
There was a small bug in XML Document that prevented file uploads from
working. I think I fixed it. :)
Diff at the bottom (do I do that right? I used diff -c, but I'm new to
diffs).
Regards,
Martijn
*** XMLDocument.py Mon Jul 26 13:07:11 1999
--- XMLDocument.py~ Thu Jul 22 19:09:11 1999
***************
*** 184,193 ****
def manage_upload(self,file='', REQUEST=None):
"""Replace the contents of the document with the text in
file."""
! if type(file) is not type(''): file=file.read()
!
! try:
! self.parse(file)
except ParseError, message:
if REQUEST: return MessageDialog(
title ='XML Parsing Error',
--- 184,191 ----
def manage_upload(self,file='', REQUEST=None):
"""Replace the contents of the document with the text in
file."""
! try:
! self.parse(data)
except ParseError, message:
if REQUEST: return MessageDialog(
title ='XML Parsing Error',