Benji York wrote:
2000--Zope---branches---2.9--2.4\build\lib\python\OFS\tests\test_XMLExportImport.py,
I suspect the following pattern needs to be changed:
ostream = tempfile.NamedTemporaryFile(suffix='.xml')
try:
data = exportXML(connection, oid, ostream)
Chris Withers wrote:
I suspect the following pattern needs to be changed:
ostream = tempfile.NamedTemporaryFile(suffix='.xml')
try:
data = exportXML(connection, oid, ostream)
ostream.flush()
sub._importObjectFromFile(ostream.name, 0, 0)
Benji York wrote:
Yep, that looks like it. Either I'll make my first commit to Zope 2
ever :) or if you want to, you can change it to something like this:
import tempfile
import os
fname = 'import_export.xml'
tempdir = tempfile.mkdtemp()
try:
ostream = open(fname, 'wb')
try: