Revision 69798327

b/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagomapper.py
35 35
import os
36 36
import re
37 37
import ctypes
38
import ConfigParser
38 39
import logging
39 40

  
40 41
from context_archipelago import ArchipelagoObject
......
66 67
        self.params = params
67 68
        self.namelen = params['namelen']
68 69
        cfg = {}
69
        bcfg = open(glue.WorkerGlue.ArchipelagoConfFile).read()
70
        cfg['blockerm'] = re.search('\'blockerm_port\'\s*:\s*\d+',
71
                                    bcfg).group(0).split(':')[1]
72
        cfg['mapperd'] = re.search('\'mapper_port\'\s*:\s*\d+',
73
                                   bcfg).group(0).split(':')[1]
70
        bcfg = ConfigParser.ConfigParser()
71
        bcfg.readfp(open(glue.WorkerGlue.ArchipelagoConfFile))
72
        cfg['blockerm'] = bcfg.getint('mapperd','blockerm_port')
73
        cfg['mapperd'] = bcfg.getint('vlmcd','mapper_port')
74 74
        self.ioctx_pool = glue.WorkerGlue().ioctx_pool
75 75
        self.dst_port = int(cfg['blockerm'])
76 76
        self.mapperd_port = int(cfg['mapperd'])

Also available in: Unified diff