equal
deleted
inserted
replaced
339 else: |
339 else: |
340 rql = 'SET %s, Y eid IN (%s), NOT X %s Y' % (rql, eidstr, rtype) |
340 rql = 'SET %s, Y eid IN (%s), NOT X %s Y' % (rql, eidstr, rtype) |
341 self._cw.execute(rql, {'x': entity.eid}) |
341 self._cw.execute(rql, {'x': entity.eid}) |
342 |
342 |
343 def registration_callback(vreg): |
343 def registration_callback(vreg): |
|
344 vreg.register_all(globals().values(), __name__) |
344 global HOST_MAPPING |
345 global HOST_MAPPING |
345 vreg.register_all(globals().values(), __name__) |
346 HOST_MAPPING = {} |
346 host_mapping_file = osp.join(vreg.config.apphome, 'hostmapping.py') |
347 if vreg.config.apphome: |
347 if osp.exists(host_mapping_file): |
348 host_mapping_file = osp.join(vreg.config.apphome, 'hostmapping.py') |
348 HOST_MAPPING = eval(file(host_mapping_file).read()) |
349 if osp.exists(host_mapping_file): |
349 vreg.info('using host mapping %s from %s', HOST_MAPPING, host_mapping_file) |
350 HOST_MAPPING = eval(file(host_mapping_file).read()) |
350 else: |
351 vreg.info('using host mapping %s from %s', HOST_MAPPING, host_mapping_file) |
351 HOST_MAPPING = {} |
|