Jose' Matos wrote:

> On Monday 03 May 2004 15:26, Angus Leeming wrote:
>> >
>> > Log message:
>> > fix bug with python 2.3 and
> extend support for secure temporary files for python >= 2.0.
> 
>   I mistyped a return and got an incomplete entry.
> 
>> Thanks, Jose.
>>
>> Jean-Marc, could I get you to test once again whether previewing
>> now works for you?
> 
>   Incidentally Angus could you verify that it works for you?

Nope it doesn't. It seems that the problem is here:

240    for file in glob.glob("%s*.ppm" % basename):
241        tmp = mkstemp()
242        new = t.open(file, "r")
243        copyfileobj(new, tmp)
244        if not new.close():
245            copyfileobj(tmp, open(file,"wb"))

Traceback (most recent call last):
  File "/home/angus/lyx/devel/lib/scripts/lyxpreview2bitmap.py", line
208, in ?
    main(sys.argv)
  File "/home/angus/lyx/devel/lib/scripts/lyxpreview2bitmap.py", line
169, in main
    return legacy_conversion(argv)
  File "/home/angus/lyx/devel/lib/scripts/legacy_lyxpreview2ppm.py",
line 315, in legacy_conversion
    crop_files(pnmcrop, latex_file_re.sub("", latex_file))
  File "/home/angus/lyx/devel/lib/scripts/legacy_lyxpreview2ppm.py",
line 245, in crop_files
    copyfileobj(tmp, open(file,"wb"))
  File "/home/angus/lyx/devel/lib/scripts/legacy_lyxpreview2ppm.py",
line 157, in copyfileobj
    buf = fsrc.read(length)

It seems that 'new.close()' leaves both 'new' and 'tmp' in a closed
state.

Angus


Reply via email to