Gentoo Archives: gentoo-catalyst

From: Brian Dolbec <dolsen@g.o>
To: gentoo-catalyst@l.g.o
Subject: Re: [gentoo-catalyst] PKGCACHE_PATH and os.makedirs() usage
Date: Wed, 29 May 2013 03:53:17
Message-Id: 1369799589.3446.106.camel@big_daddy.dol-sen.ca
In Reply to: Re: [gentoo-catalyst] PKGCACHE_PATH and os.makedirs() usage by Mike Frysinger
1 On Tue, 2013-05-28 at 23:17 -0400, Mike Frysinger wrote:
2 > On Tuesday 28 May 2013 22:08:38 Brian Dolbec wrote:
3 > > Further investigation of the use of os.makedirs() reveals that none of
4 > > it's frequent use does any error checking or exception escaping.
5 > > I propose to move this common code to either a utility function or
6 > > possibly a FileOps class that the main classes can then subclass or
7 > > create an instance of. I need to investigate what method will be best.
8 > > That way, exceptions can be controlled for the type of failure desired.
9 > > As well as proper shutdown procedures to run for a failure.
10 >
11 > i get the feeling that catalyst really needs to get away from implementing
12 > everything itself (either open coding it, or generating its own util libs).
13 > there are perfectly fine drop in util libs like snakeoil.
14 > http://docs.snakeoil.googlecode.com/git/index.html
15 > osutils.ensure_dirs()
16 > -mike
17
18 yeah, good idea. I keep forgetting all what snakeoil offers, but moving
19 to using some of it at least was on my TODO.