[qmtest] [PATCH] Fix open_temporary_file_fd

Mark Mitchell mark at codesourcery.com
Sun Feb 15 20:38:38 UTC 2004


Nathaniel Smith wrote:

> Attached patch fixes regressions caused by changes to
> open_temporary_file_fd.

Oh, bummer.  I only tested on Windows, as is clear.

> Okay to apply?  Feels ugly, using the if there, but I guess the
> function'll get ripped out entirely when we start assuming Python
> 2.3...

I'm disappointed that "mktemp" doesn't do the right thing with a "None"
argument.  Maybe using the empty string ("") as the default (instead of 
None) would be the right choice and avoid the conditional?

If that works, it's OK; if not, your original patch is OK.

Please apply it to the 2.1 branch as well as the mainline, since I put 
my patch in both places.

And, yes, at some point (perhaps 2.2) we'll require Python 2.3, and then 
we can just get rid of this stuff.

Thanks,

-- 
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com



More information about the qmtest mailing list