Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/package/ebuild/_config/
Date: Sun, 30 Oct 2011 07:16:19
Message-Id: 4cf9c9eb3d11fb653695c483d0013cba8b08039a.zmedico@gentoo
1 commit: 4cf9c9eb3d11fb653695c483d0013cba8b08039a
2 Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
3 AuthorDate: Sun Oct 30 07:15:57 2011 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 30 07:15:57 2011 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4cf9c9eb
7
8 _profile_node: use collections.namedtuple
9
10 ---
11 .../package/ebuild/_config/LocationsManager.py | 14 +++-----------
12 1 files changed, 3 insertions(+), 11 deletions(-)
13
14 diff --git a/pym/portage/package/ebuild/_config/LocationsManager.py b/pym/portage/package/ebuild/_config/LocationsManager.py
15 index 244b7e0..f559bb5 100644
16 --- a/pym/portage/package/ebuild/_config/LocationsManager.py
17 +++ b/pym/portage/package/ebuild/_config/LocationsManager.py
18 @@ -5,6 +5,7 @@ __all__ = (
19 'LocationsManager',
20 )
21
22 +import collections
23 import io
24 import warnings
25
26 @@ -23,17 +24,8 @@ _PORTAGE1_DIRECTORIES = frozenset([
27 'package.use', 'package.use.mask', 'package.use.force',
28 'use.mask', 'use.force'])
29
30 -class _profile_node(object):
31 -
32 - __slots__ = ('location', 'portage1_directories')
33 -
34 - def __init__(self, location, portage1_directories):
35 - object.__setattr__(self, 'location', location)
36 - object.__setattr__(self, 'portage1_directories', portage1_directories)
37 -
38 - def __setattr__(self, name, value):
39 - raise AttributeError("_profile_node instances are immutable",
40 - self.__class__, name, value)
41 +_profile_node = collections.namedtuple('_profile_node',
42 + 'location portage1_directories')
43
44 class LocationsManager(object):