Commit Graph

9 Commits

Author SHA1 Message Date
Eygene Ryabinkin
41cb0f577f Prune trailing whitespaces from code and documentation
They are redundant in all pruned cases and sometimes even create some
problems, e.g., when one tries to jump through paragraphs in vi.

Signed-off-by: Eygene Ryabinkin <rea@codelabs.ru>
2013-07-21 23:00:23 +04:00
Sebastian Spaeth
a8c6407f50 Implement CustomConfig.set_if_not_exists()
A convenience helper function that allows to set a configuration value
if the user has not explicitly configured anything ie the option does
not exist yet in the configuration. It won't do anything, if the option
exists.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-02-17 10:28:59 +01:00
Sebastian Spaeth
a8ab269ada Import configparser for python3 compatability
Attempt to load first ConfigParser and then configparser. At some point this
should be switched to do the python3 thing first.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-02-06 17:41:42 +01:00
Sebastian Spaeth
55da31c84b octal notation 0700 -> 0o700
Use octal notation that python3 understands. Works >=python2.6

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2012-02-06 17:41:42 +01:00
Sebastian Spaeth
ae8a1cb79f Remove deprecated calls to apply()
apply() has been deprecated since Python 2.3, and won't be working in
python 3 anymore. Use the functional equivalent throughout.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-09-27 13:00:12 +02:00
Sebastian Spaeth
4db5913492 Use SafeConfigParser for the configuration
SafeConfigParser is very similar to the currently used ConfigParser but
it supports interpolation. This means values can contain format strings
which refer to other values in the same section, or values in a special
DEFAULT section. For example:

[My Section]
foodir: %(dir)s/whatever
dir=frob

would resolve the %(dir)s to the value of dir (frob in this case). All reference expansions are done on demand.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
Signed-off-by: Nicolas Sebrecht <nicolas.s-dev@laposte.net>
2011-08-30 22:16:35 +02:00
Sebastian Spaeth
c5d49cec3e Improve CustomConfig documentation
Improve documentation about what CustomConfigHelperMixin does,
it was not very clear without a close look to the code before.

Signed-off-by: Sebastian Spaeth <Sebastian@SSpaeth.de>
2011-01-20 19:46:01 +01:00
John Goerzen
39a18fef60 Update FSF address 2006-08-12 05:15:55 +01:00
John Goerzen
d839be3c61 Step 2 of SVN to arch tree conversion 2005-04-16 20:33:35 +01:00