Gentoo Archives: gentoo-catalyst

From: Mike Frysinger <vapier@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] [PATCH] catalyst: add a wrapper for executing directly out of git
Date: Mon, 09 Nov 2015 21:23:43
Message-Id: 20151109212337.GG5154@vapier.lan
In Reply to: [gentoo-catalyst] [PATCH] catalyst: add a wrapper for executing directly out of git by Mike Frysinger
1 On 09 Nov 2015 16:05, Mike Frysinger wrote:
2 > + with tempfile.NamedTemporaryFile(prefix='catalyst.conf.') as conf:
3 > + # Set up a config file with paths to the local tree.
4 > + conf.write(
5 > + ('sharedir=%(source_root)s\n'
6 > + 'shdir=%(source_root)s/targets\n'
7 > + 'envscript=%(source_root)s/etc/catalystrc\n'
8 > + % {'source_root': source_root}).encode('utf8')
9 > + )
10 > + conf.flush()
11
12 before anyone suggests using the buffering option when creating
13 tempfile.NamedTemporaryFile, you should be aware that the arg
14 name & meaning changed between py2 & py3. it's simpler to flush.
15 -mike

Attachments

File name MIME type
signature.asc application/pgp-signature