iro/config.py
changeset 312 42fd5075a5d1
parent 306 b31978c0c043
equal deleted inserted replaced
311:81916344c63b 312:42fd5075a5d1
    20 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    20 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
    21 
    21 
    22 from twisted.python import log
    22 from twisted.python import log
    23 
    23 
    24 import os.path
    24 import os.path
    25 from ConfigParser import ConfigParser
    25 from configparser import ConfigParser
    26 import signal
    26 import signal
    27 from functools import partial
    27 from functools import partial
    28 try:
    28 try:
    29     from collections import OrderedDict
    29     from collections import OrderedDict
    30 except ImportError:
    30 except ImportError:
    31     from ordereddict import OrderedDict
    31     from ordereddict import OrderedDict
    32 
    32 
    33 from validate import vInteger
    33 from .validate import vInteger
    34 from error import NeededOption 
    34 from .error import NeededOption
    35 
    35 
    36 class MyConfigParser(ConfigParser):
    36 class MyConfigParser(ConfigParser):
    37     """Configparser that also validate configfile.
    37     """Configparser that also validate configfile.
    38 
    38 
    39     It is possile to restiger function, that are called, when config file is reloaded
    39     It is possile to restiger function, that are called, when config file is reloaded