Source

sphinx-gsoc2009 / sphinx / web / webconfig.py

#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
    sphinx.web.webconfig
    ~~~~~~~~~~~~~~~~~~~~

    Webapp-level configuration file class.
  
    :copyright: Copyright 2007-2009 by the Sphinx team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from sphinx.errors import SphinxError
from ConfigParser import ConfigParser

class WebConfig(object):
    def __init__(self, configfile='webapp.conf'):
        self.configfile = configfile
        self.conf = ConfigParser()
        self.conf.read(self.configfile)

        self.licence = self.conf.get('General', 'licence')

        self.piddbfile = self.conf.get('Repository', 'piddbfile')
        self.repodir = self.conf.get('Repository', 'repodir')
        self.reposums = self.conf.get('Repository', 'reposums')