blob: ad7ad1d8e2bb7a591f3929c274f8d5d72c72f42b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# Copyright: 2005 Gentoo Foundation
# Author(s): Brian Harring (ferringb@gentoo.org)
# License: GPL2
# $Header: /local/data/ulm/cvs/history/var/cvsroot/gentoo-src/portage/portage/config/__init__.py,v 1.1 2005/07/10 09:21:05 ferringb Exp $
import ConfigParser
import central, os
from portage.const import DEFAULT_CONF_FILE
def load_config(file=DEFAULT_CONF_FILE):
c = ConfigParser.ConfigParser()
if os.path.isfile(file):
c.read(file)
c = central.config(c)
else:
# make.conf...
raise Exception("sorry, default '%s' doesn't exist, and I don't like make.conf currently (I'm working out my issues however)" %
file)
return c
|