def readConfig(self, file_id):
        configDic = {}
        servicePattern = '(~+)Service Configuration(~+)'
        netPattern = '(~+)Network Configuration(~+)'
        nsPattern = '~([^~]+)Namespace Configuration(~+)'
        xdrPattern = '(~+)XDR Configuration(~+)'
        dcPattern = '~([^~]+)DC Configuration(~+)'

        line = file_id.readline()

        while(not re.search(self.section_separator, line) and not re.search(self.section_separator_with_date,line)):
            if line.strip().__len__() != 0:
                dic = {}
                key = "key"
                if re.search(servicePattern, line):
                    dic = configDic
                    key = "service"
                elif re.search(netPattern, line):
                    dic = configDic
                    key = "network"
                elif re.search(nsPattern, line):
                    if "namespace" not in configDic:
                        configDic["namespace"] = {}
                    dic = configDic["namespace"]
                    key = re.search(nsPattern, line).group(1).strip()
                elif re.search(xdrPattern, line):
                    dic = configDic
                    key = "xdr"
                elif re.search(dcPattern, line):
                    if "dc" not in configDic:
                        configDic["dc"] = {}
                    dic = configDic["dc"]
                    key = re.search(dcPattern, line).group(1).strip()

                dic[key] = self.htableToDic(file_id)
            try:
                line = file_id.readline()
            except __HOLE__:
                break
        return configDic
dataset/ETHPy150Open aerospike/aerospike-admin/lib/logreader.py/LogReader.readConfig