f0ec0b88e84285469da3fd01afdb120bf284b625 wong Wed Dec 14 10:25:55 2011 -0800 error in making the common set of stanzas, not intersection of self and self, that's just plain wrong diff --git python/lib/ucscgenomics/ra.py python/lib/ucscgenomics/ra.py index d0f087f..e3e15b8 100644 --- python/lib/ucscgenomics/ra.py +++ python/lib/ucscgenomics/ra.py @@ -310,31 +310,31 @@ def updateDiffFilter(self, term, other): ''' Replicates updateMetadata. Input: Term Other raFile Output: Merged RaFile Stanzas found in 'self' and 'other' that have the 'Term' in 'other' are overwritten (or inserted if not found) into 'self'. Final merged dictionary is returned. ''' ret = self - common = set(self.iterkeys()) & set(self.iterkeys()) + common = set(self.iterkeys()) & set(other.iterkeys()) for stanza in common: if term not in self[stanza] and term not in other[stanza]: continue if term in self[stanza] and term not in other[stanza]: del ret[stanza][term] continue if term in other[stanza]: #Remake stanza to keep order of terms tempStanza = RaStanza() tempStanza._name = stanza try: tempStanza['metaObject'] = self[stanza]['metaObject'] tempStanza['objType'] = self[stanza]['objType'] termList = self[stanza].keys()