Revision dc7159be
b/snf-pithos-backend/pithos/backends/lib/hashfiler/archipelagoblocker.py | ||
---|---|---|
35 | 35 |
from binascii import hexlify |
36 | 36 |
import os |
37 | 37 |
import re |
38 |
import ConfigParser |
|
38 | 39 |
|
39 | 40 |
from context_archipelago import ArchipelagoObject, file_sync_read_chunks |
40 | 41 |
from archipelago.common import ( |
... | ... | |
62 | 63 |
|
63 | 64 |
def __init__(self, **params): |
64 | 65 |
cfg = {} |
65 |
bcfg = open(glue.WorkerGlue.ArchipelagoConfFile).read()
|
|
66 |
cfg['blockerb'] = re.search('\'blockerb_port\'\s*:\s*\d+',
|
|
67 |
bcfg).group(0).split(':')[1]
|
|
66 |
bcfg = ConfigParser.ConfigParser()
|
|
67 |
bcfg.readfp(open(glue.WorkerGlue.ArchipelagoConfFile))
|
|
68 |
cfg['blockerb'] = bcfg.getint('mapperd','blockerb_port')
|
|
68 | 69 |
blocksize = params['blocksize'] |
69 | 70 |
hashtype = params['hashtype'] |
70 | 71 |
try: |
Also available in: Unified diff