Gentoo Archives: gentoo-catalyst

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

Attachments

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

Replies

Subject Author
Re: [gentoo-catalyst] PKGCACHE_PATH and os.makedirs() usage Brian Dolbec <dolsen@g.o>