[Tests] Fix use get_iter_first for treestore

This commit is contained in:
Calum Lind 2018-09-20 15:10:28 +01:00 committed by Calum Lind
parent bcaaeac852
commit bbcebe1306
2 changed files with 2 additions and 3 deletions

View File

@ -48,7 +48,7 @@ class FilesTabTestCase(BaseTestCase):
return component.shutdown() return component.shutdown()
def print_treestore(self, title, treestore): def print_treestore(self, title, treestore):
root = treestore.get_iter_root() root = treestore.get_iter_first()
level = 1 level = 1
def p_level(s, l): def p_level(s, l):
@ -79,7 +79,7 @@ class FilesTabTestCase(BaseTestCase):
i += 1 i += 1
return True return True
return _verify_treestore(treestore.get_iter_root(), tree) return _verify_treestore(treestore.get_iter_first(), tree)
def test_files_tab(self): def test_files_tab(self):
self.filestab.files_list[self.t_id] = ( self.filestab.files_list[self.t_id] = (

View File

@ -413,7 +413,6 @@ class FilesTab(Tab):
def update_folder_percentages(self): def update_folder_percentages(self):
"""Go through the tree and update the folder complete percentages.""" """Go through the tree and update the folder complete percentages."""
# FIXME Why changed? Was: self.treestore.get_iter_root()
root = self.treestore.get_iter_first() root = self.treestore.get_iter_first()
if root is None or self.treestore[root][5] != -1: if root is None or self.treestore[root][5] != -1:
return return