Michal Čihař wrote:
Hi
Dne Fri, 15 May 2009 05:40:54 -0600 (MDT) "Novell Forge SVN"
napsal(a): print 'Getting buildinfo from server' - bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = '/tmp') + tempdir = '/tmp' + if sys.platform[:3] == 'win': + tempdir = os.getenv('TEMP') + bi_file = NamedTemporaryFile(suffix='.xml', prefix='buildinfo.', dir = tempdir)
Would not be better to use tempfile.gettempdir() regardless current platform?
My first version of the change just removed dir as optional parameter (module should figure it out by itself what the tempdir is, regardless of platform). But later in the code (function delete_tmpdir) there is an explicit check if the path starts with '/tmp' and this couldn't be guaranteed anymore (module could use '/var/tmp'). What do you think about rewriting the code so it doesn't explicitly set tempdir in these calls and removing the check in delete_tmpdir ? -- Best Regards / S pozdravom, Pavol RUSNAK SUSE LINUX, s.r.o Package Maintainer Lihovarska 1060/12 PGP 0xA6917144 19000 Praha 9, CR prusnak[at]suse.cz http://www.suse.cz -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-buildservice+help@opensuse.org