mirror of
https://github.com/Kozea/Radicale.git
synced 2025-07-23 17:48:30 +00:00
Python 3 support and minor fixes.
This commit is contained in:
parent
4a0d3936e8
commit
4ee09cf817
11 changed files with 66 additions and 70 deletions
|
@ -24,7 +24,10 @@ Radicale configuration module.
|
|||
Give a configparser-like interface to read and write configuration.
|
||||
"""
|
||||
|
||||
from ConfigParser import RawConfigParser as ConfigParser
|
||||
try:
|
||||
from configparser import RawConfigParser as ConfigParser
|
||||
except ImportError:
|
||||
from ConfigParser import RawConfigParser as ConfigParser
|
||||
|
||||
_config = ConfigParser()
|
||||
get = _config.get
|
||||
|
@ -68,9 +71,9 @@ _initial = {
|
|||
},
|
||||
}
|
||||
|
||||
for section, values in _initial.iteritems():
|
||||
for section, values in _initial.items():
|
||||
_config.add_section(section)
|
||||
for key, value in values.iteritems():
|
||||
for key, value in values.items():
|
||||
_config.set(section, key, value)
|
||||
|
||||
# TODO: Use abstract filename for other platforms
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue