Commit eb303fa4 authored by bliss administrator's avatar bliss administrator Committed by Sebastien Petitdemange
Browse files

tmp? fix: do not use weakproxy for references

Weakproxy cannot be used as a key for dict
parent c4902332
......@@ -5,8 +5,6 @@
# Copyright (c) 2016 Beamline Control Unit, ESRF
# Distributed under the GNU LGPLv3. See LICENSE for more info.
import weakref
def find_class(cfg_node,base_path='bliss.controllers'):
klass_name = cfg_node.get_inherited('class')
if klass_name is None:
......@@ -32,7 +30,7 @@ def find_class(cfg_node,base_path='bliss.controllers'):
def _checkref(config,item_cfg_node,referenced_objects,name,value):
if isinstance(value, str) and value.startswith("$"):
# convert reference to item from config
obj = weakref.proxy(config.get(value))
obj = config.get(value)
item_cfg_node[name]=obj
referenced_objects[name]=obj
return True
......@@ -63,7 +61,7 @@ def _parse_list(config,value):
object_list = list()
for node in value:
if isinstance(node,(str,unicode)) and node.startswith("$"):
object_list.append(weakref.proxy(config.get(node)))
object_list.append(config.get(node))
elif isinstance(node,dict):
subdict = dict()
subref = dict()
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment