From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 617E51384B4 for ; Mon, 9 Nov 2015 21:23:43 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1EAFDE0858; Mon, 9 Nov 2015 21:23:40 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id A6C00E0858 for ; Mon, 9 Nov 2015 21:23:39 +0000 (UTC) Received: from vapier.lan (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with SMTP id 844FB340504 for ; Mon, 9 Nov 2015 21:23:37 +0000 (UTC) Date: Mon, 9 Nov 2015 16:23:37 -0500 From: Mike Frysinger To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] [PATCH] catalyst: add a wrapper for executing directly out of git Message-ID: <20151109212337.GG5154@vapier.lan> Mail-Followup-To: gentoo-catalyst@lists.gentoo.org References: <1447103145-18905-1-git-send-email-vapier@gentoo.org> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-catalyst@lists.gentoo.org Reply-to: gentoo-catalyst@lists.gentoo.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MvEh5MSbieV/1Yst" Content-Disposition: inline In-Reply-To: <1447103145-18905-1-git-send-email-vapier@gentoo.org> X-Archives-Salt: cc6255d9-6f40-45c6-af76-e02678dbd533 X-Archives-Hash: daac9d92cef225bf042abddbbc991aa7 --MvEh5MSbieV/1Yst Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 09 Nov 2015 16:05, Mike Frysinger wrote: > + with tempfile.NamedTemporaryFile(prefix=3D'catalyst.conf.') as conf: > + # Set up a config file with paths to the local tree. > + conf.write( > + ('sharedir=3D%(source_root)s\n' > + 'shdir=3D%(source_root)s/targets\n' > + 'envscript=3D%(source_root)s/etc/catalystrc\n' > + % {'source_root': source_root}).encode('utf8') > + ) > + conf.flush() before anyone suggests using the buffering option when creating=20 tempfile.NamedTemporaryFile, you should be aware that the arg name & meaning changed between py2 & py3. it's simpler to flush. -mike --MvEh5MSbieV/1Yst Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJWQQ7ZAAoJEEFjO5/oN/WBwXcQAK9fFbKROmboduIqNeJEGBp/ l8Ywi6fiY7jLa50e0e9PXMLl82uTwFlT+Dh0aC2SGrHse4XQUq38qvemVBp3kp4+ eT5UlOhRmFB5G4CY5O6fXtev9Ho2Ahdt7oic7zAmtEJNW4BfMr4wm4Nz6lCcFniw 7YDICSdY7DpMuSJAJyYY4sNPIKxikZp2UhlR5pQ9gUVMhecfsflIniqwdzIoo0H3 QRCRxE+3S+ESRMmyz9cQNZiAXKQkD6g2TpmqPAKy0M11+bhdaYkGHD9xSuzZ3D8J XBpDR4in3+RFozsFKtogYONZk46QuyQvEpXynC9nTPpY6czNUYT+sKBUW6MKikIp emQseqDOi8m6seykmn8TupDRbpJiYkPiPS7MaChtNlxlK8Fwr0lavFn8A+9PIQAt JrNUHJ5gO8dyqyE1m27oz2Bq/N1ROpw7IQpk3zZak+Mw6gQQh+CAc0J4fzqgdFYn wjAiGpNSMYVxAK4X0kr0+0OTs6SSwol9lrltWhT5cvrBsOsu0YuHXNKDXLB6BI2V JsngRkmBSc0/kIGpWFZ2PQXlFUDBi9JWDzxVZXXQXswokSEsNI68vt5skqGJHK/w XbP2vCM2fm/rrztu3NklccyJK0ii1YJiGCWiP6PKokpFShnck6YxehwPpPvJdTsf AdFabosRQYm6eWSgZtxn =NrPp -----END PGP SIGNATURE----- --MvEh5MSbieV/1Yst--