X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=sfa%2Fstorage%2Fmodel.py;h=7ce834574626a182b1461543c84c69fd06eb0109;hb=c7c7ed1178348445dc4ae70ea0fd905625e95421;hp=7ed955f4ecaa79096fe2a5da6f4cda3572007dd6;hpb=45497b8b240a6347ed340f2219996afccc558a29;p=sfa.git diff --git a/sfa/storage/model.py b/sfa/storage/model.py index 7ed955f4..7ce83457 100644 --- a/sfa/storage/model.py +++ b/sfa/storage/model.py @@ -107,8 +107,14 @@ class RegRecord (Base, AlchemyObj): if dict: self.load_from_dict (dict) def __repr__(self): - result="", " name={}>".format(self.name)) +# here again trying to display names that can be utf8 is too dangerous +# result.replace(">", " name={}>".format(self.name)) return result def update_pis (self, pi_hrns, dbsession): @@ -462,9 +469,9 @@ def make_record_dict (record_dict): # register non-db attributes in an extensions field return result -def make_record_xml (xml): - xml_record = XML(xml) - xml_dict = xml_record.todict() +def make_record_xml (xml_str): + xml = XML(xml_str) + xml_dict = xml.todict() logger.info("load from xml, keys=%s"%xml_dict.keys()) return make_record_dict (xml_dict)