From: Tony Mack Date: Wed, 26 Oct 2011 18:38:50 +0000 (-0400) Subject: should no longer need to normalize dict X-Git-Tag: sfa-1.1-1~22 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=c732a4bf3f49affb7e44c68ac424455283e9beaa;p=sfa.git should no longer need to normalize dict --- diff --git a/sfa/plc/api.py b/sfa/plc/api.py index 4ce2f9e8..2977a535 100644 --- a/sfa/plc/api.py +++ b/sfa/plc/api.py @@ -584,15 +584,15 @@ class SfaAPI(BaseAPI): oldList = [] newList = record.get(listName, []) # ugly hack to see what's next - def normalize (value): - from types import StringTypes - from sfa.util.sfalogging import logger - if isinstance(value,StringTypes): return value - elif isinstance(value,dict): - newvalue=value['text'] - logger.info("Normalizing %s=>%s"%(value,newvalue)) - return newvalue - newList=[normalize(v) for v in newList] + #def normalize (value): + # from types import StringTypes + # from sfa.util.sfalogging import logger + # if isinstance(value,StringTypes): return value + # elif isinstance(value,dict): + # newvalue=value['text'] + # logger.info("Normalizing %s=>%s"%(value,newvalue)) + # return newvalue + #newList=[normalize(v) for v in newList] # if the lists are the same, then we don't have to update anything if (oldList == newList):