On Thu, 2012-06-07 at 09:52 -0700, Brian C. Lane wrote: > On Thu, Jun 07, 2012 at 03:15:05PM +0200, Vratislav Podzimek wrote: > > + @property > > + def servers(self): > > + ret = list() > > + > > + itr = self._serversStore.get_iter_first() > > + while itr: > > + row = self._serversStore[itr] > > + if row[2]: > > + #server checked > > + ret.append(row[0]) > > + > > + itr = self._serversStore.iter_next() > > + > > + return ret > > Can you use for instead? I see that serverStore is a GtkListStore but > hopefully it can be iterated over in a pythonic way: > > for itr in self._serversStore: > etc. > Didn't know about this way, thanks! It should be for row in self._serversStore: etc. because it is iterating over rows, but it works. Great! However, I'd like to push this as it is and write a new patch changing all GtkListStore iterations using while to use for. -- Vratislav Podzimek Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list