~ubuntu-branches/ubuntu/trusty/lottanzb/trusty

« back to all changes in this revision

Viewing changes to lottanzb/config/__init__.py

  • Committer: Daniel Holbach
  • Date: 2011-02-21 07:47:30 UTC
  • mfrom: (7.1.1 natty)
  • Revision ID: daniel.holbach@canonical.com-20110221074730-9ozyhdic25bo6k2g
Tags: 0.6-1ubuntu1
* debian/lottanzb.install, debian/icons/*:
  + Add dark and light application icon for the panel menu.
* New upstream release.

* Switch to dpkg-source 3.0 (quilt) format.
* Use debhelper 7 instead of cdbs.
* Use dh_python2 instead of python-support.
* Delete superfluous debian/pyversions and debian/pycompat.

* debian/compat:
  + Bump to debhelper 7.
* debian/control:
  + Change Priority from extra to optional.
  + Replace XS-Python-Version with X-Python-Version and bump it to >= 2.6.
  + Remove cdbs and python-support from Build-Depends.
  + Bump debhelper to >= 7.0.50~ in Build-Depends.
  + Bump python to >= 2.6.6-3 in Build-Depends.
  + Remove python-kiwi, hellanzb and python from Depends.
  + Add python-configobj to Depends.
  + Bump python-gtk2 to >= 2.16 in Depends.
  + Bump yelp to >= 2.30 in Recommends for Mallard support.
  + Add python-apt and apturl to Recommends.
  + Add sabnzbdplus to Suggests.
  + Replace hellanzb with sabnzbdplus in Enhances.
  + Update Description.
* debian/copyright:
  + Make it machine-interpretable according to DEP-5.
  + Remove information for Kiwi code.
  + Update information for help/*.
  + Add information for lottanzb/backend/interface/multipart_post_handler.py.
* debian/lottanzb.lintian-overrides:
  + Override extra-license-file warning for documentation files.
* debian/lottanzb.menu:
  + Update application title.
* debian/patches/lock-file-name.patch:
  + Delete because fixed upstream.
* debian/rules:
  + Install into private directory /usr/share/lottanzb.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2008-2011 LottaNZB Development Team
 
2
 
3
# This program is free software; you can redistribute it and/or modify
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; version 3.
 
6
 
7
# This program is distributed in the hope that it will be useful,
 
8
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
9
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
10
# GNU General Public License for more details.
 
11
 
12
# You should have received a copy of the GNU General Public License
 
13
# along with this program; if not, write to the Free Software
 
14
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
15
 
 
16
"""
 
17
Distributed configuration system with validation support, nested sections...
 
18
 
 
19
This module aims to simplify the handling of configuration data in an
 
20
application. It doesn't contain any information about the actual configuration
 
21
used by the application such as its structure, default values, validation
 
22
routines etc.
 
23
 
 
24
Configuration files are parsed and generated using Python's ConfigParser class,
 
25
so their fully standard-compliant. Subsections, which aren't covered by the
 
26
standard are implemented using the dot character, e. g. [section.subsection].
 
27
 
 
28
Each section and all of its content is stored as an instance of ConfigSection.
 
29
ConfigSection lets you enforce certain option value types and specify
 
30
validation routines, but this is not obligatory.
 
31
 
 
32
If this module needs to create a `ConfigSection` instance, it will look for a
 
33
class named `Config` in the application module that matches the section's name.
 
34
(e. g. the class `Config` in the modes module for the section called [modes]).
 
35
If it doesn't find such a customized class, it falls back to `ConfigSection`.
 
36
 
 
37
The class `Config` in this module loads and saves the configuration file.
 
38
 
 
39
Both options and subsections can be accessed either as attributes or using
 
40
brackets. E. g.:
 
41
 
 
42
    print App().config.modes.active
 
43
    App().config["plugins"].categories["enabled"] = False
 
44
    App().config.save()
 
45
"""
 
46
 
 
47
from lottanzb.config.errors import *
 
48
from lottanzb.config.section import *
 
49
from lottanzb.config.roots import *