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 B79631381F3 for ; Wed, 29 May 2013 03:17:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 70FB3E0AF4; Wed, 29 May 2013 03:17:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id E8043E0AF4 for ; Wed, 29 May 2013 03:17:37 +0000 (UTC) Received: from vapier.localnet (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id EB96833DEE1 for ; Wed, 29 May 2013 03:17:36 +0000 (UTC) From: Mike Frysinger Organization: wh0rd.org To: gentoo-catalyst@lists.gentoo.org Subject: Re: [gentoo-catalyst] PKGCACHE_PATH and os.makedirs() usage Date: Tue, 28 May 2013 23:17:41 -0400 User-Agent: KMail/1.13.7 (Linux/3.8.3; KDE/4.6.5; x86_64; ; ) References: <1369793318.3446.100.camel@big_daddy.dol-sen.ca> In-Reply-To: <1369793318.3446.100.camel@big_daddy.dol-sen.ca> 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; boundary="nextPart14580513.J6t1jJ9UFA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201305282317.42617.vapier@gentoo.org> X-Archives-Salt: a237fd90-7354-4684-8ce9-aff8ce083c8c X-Archives-Hash: a33f28d5f19b98309396ad513f5dee3b --nextPart14580513.J6t1jJ9UFA Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable On Tuesday 28 May 2013 22:08:38 Brian Dolbec wrote: > Further investigation of the use of os.makedirs() reveals that none of > it's frequent use does any error checking or exception escaping. > I propose to move this common code to either a utility function or > possibly a FileOps class that the main classes can then subclass or > create an instance of. I need to investigate what method will be best. > That way, exceptions can be controlled for the type of failure desired. > As well as proper shutdown procedures to run for a failure. i get the feeling that catalyst really needs to get away from implementing= =20 everything itself (either open coding it, or generating its own util libs).= =20 there are perfectly fine drop in util libs like snakeoil. http://docs.snakeoil.googlecode.com/git/index.html osutils.ensure_dirs() =2Dmike --nextPart14580513.J6t1jJ9UFA Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.17 (GNU/Linux) iQIcBAABAgAGBQJRpXNWAAoJEEFjO5/oN/WBbDIP/iKDutSUCpLkSgQKHOuETSyK +MbSss9aXFUL4L1ocipZAZ4KVGxf9mfabkOtycovHrd6zKc34XDGXj8aOERCoh3z 9dPHgrX18Olww6pBoRuzLq7QM1MLB5D4YYZ5GfIiOI+poJwJKD8HNOwAez9aqB9f dYrYoQi2C+1+cxMokSWs4LMDyetkI8BcDpbYPfPyuxv6lrt2qHawvSVdbAr5KMHS Pp71EZx8+SqMiOzlx5EzFuf+rqypgW73jWwe00zHwIcJHLeJq/dlinE7VsIaoibY 7MT6gQMvGDk0jrkjfBPxAeiJd+7Ax9bpY2rCXiv1do3Cuqx2CSN63eIkav0Vh1L+ kEM2TOXVoW8KWpq10i/z6+xQAAcnqYhYwoFo7S+OZdYDFKhvcMVqb4IV5FN1P8f0 kw2s7DSX6efM0kPkMz24AjKLNTVyf+B3jaavUcL2cuFx3Screj5tvODS7P590/HX q1kd4bGEFkEakihyYRL5doBCJl/taEz2M73AoX1owEF6zsaDrg0ixkchaF8u9jgz 6eZWW02FoZhqM+FmqC01yW8GyC7VlHBlB6TUGB9CnJas1GFEAU7e0Bmng93MCUtR oxL882oQHdVNInfNgLuVVQjq80sNsI1fLT7cBIfkjx61GZF0V/t5QH8/+ywWxMXk 7Z0xwFlBryGu8PYt/cJT =92++ -----END PGP SIGNATURE----- --nextPart14580513.J6t1jJ9UFA--