pgtoolkit/config.py
changeset 10 f3a1b9792cc9
parent 9 2fcc8ef0b97d
child 17 f768a3529ee7
equal deleted inserted replaced
9:2fcc8ef0b97d 10:f3a1b9792cc9
     3 
     3 
     4 class ConfigParser:
     4 class ConfigParser:
     5     def __init__(self):
     5     def __init__(self):
     6         self.args = {}       # config file arguments
     6         self.args = {}       # config file arguments
     7         self.registered_args = {}
     7         self.registered_args = {}
     8         self.log = logging.getLogger('config') 
     8         self.log = logging.getLogger('config')
     9 
     9 
    10     def add_argument(self, name, type=str, default=None):
    10     def add_argument(self, name, type=str, default=None):
    11         self.registered_args[name] = {'type':type, 'default':default}
    11         self.registered_args[name] = {'type':type, 'default':default}
    12 
    12 
    13     def load(self, fname):
    13     def load(self, fname):