public inbox for gentoo-catalyst@lists.gentoo.org
 help / color / mirror / Atom feed
From: Mike Frysinger <vapier@gentoo.org>
To: gentoo-catalyst@lists.gentoo.org
Subject: Re: [gentoo-catalyst] [PATCH] catalyst: add a wrapper for executing directly out of git
Date: Mon, 9 Nov 2015 16:23:37 -0500	[thread overview]
Message-ID: <20151109212337.GG5154@vapier.lan> (raw)
In-Reply-To: <1447103145-18905-1-git-send-email-vapier@gentoo.org>

[-- Attachment #1: Type: text/plain, Size: 613 bytes --]

On 09 Nov 2015 16:05, Mike Frysinger wrote:
> +	with tempfile.NamedTemporaryFile(prefix='catalyst.conf.') as conf:
> +		# Set up a config file with paths to the local tree.
> +		conf.write(
> +			('sharedir=%(source_root)s\n'
> +			 'shdir=%(source_root)s/targets\n'
> +			 'envscript=%(source_root)s/etc/catalystrc\n'
> +			 % {'source_root': source_root}).encode('utf8')
> +		)
> +		conf.flush()

before anyone suggests using the buffering option when creating 
tempfile.NamedTemporaryFile, you should be aware that the arg
name & meaning changed between py2 & py3.  it's simpler to flush.
-mike

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  reply	other threads:[~2015-11-09 21:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-09 21:05 [gentoo-catalyst] [PATCH] catalyst: add a wrapper for executing directly out of git Mike Frysinger
2015-11-09 21:23 ` Mike Frysinger [this message]
2015-11-10  6:53 ` Brian Dolbec
  -- strict thread matches above, loose matches on Subject: below --
2015-10-29  5:48 Mike Frysinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151109212337.GG5154@vapier.lan \
    --to=vapier@gentoo.org \
    --cc=gentoo-catalyst@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox