> > + def add(self, obj): > > + if isinstance(obj, KickstartCommand): > > + # Commands can only be run once, and the latest one seen takes > > + # precedence over any earlier ones. > > + i = 0 > > + while i < len(self._dataObjs): > > + if self._dataObjs[i].__class__ == obj.__class__: > > + break > > + > > + i += 1 > > + > > + if i == len(self._dataObjs): > > + self._dataObjs.append(obj) > > + else: > > + self._dataObjs[i] = obj > > Shouldn't this instead remove the now-obsolete earlier command from the > list and then append the new one to the end of the list? As it stands, > you're not really preserving the ordering. Yes, yes it should. Good catch. So, add should look more like this: def add(self, obj): if isinstance(obj, KickstartCommand): # Commands can only be run once, and the latest one seen takes # precedence over any earlier ones. i = 0 while i < len(self._dataObjs): if self._dataObjs[i].__class__ == obj.__class__: self._dataObjs.pop(i) break i += 1 self._dataObjs.append(obj) ... - Chris _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list