diff options
author | Jeremy Katz <katzj@redhat.com> | 2003-02-10 19:29:56 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2003-02-10 19:29:56 +0000 |
commit | ed4fe9b69193eda888be1cfb5d8dd5d33329d50e (patch) | |
tree | 253dd1702ee1c8e09cb572d9797a13047c7ea83b /iw | |
parent | 4ccdc2772c332d406e2b694fe136408652985f88 (diff) | |
download | anaconda-ed4fe9b69193eda888be1cfb5d8dd5d33329d50e.tar.gz anaconda-ed4fe9b69193eda888be1cfb5d8dd5d33329d50e.tar.xz anaconda-ed4fe9b69193eda888be1cfb5d8dd5d33329d50e.zip |
I can't reproduce getting into a state where this would happen, but let's
be safe (#83765)
Diffstat (limited to 'iw')
-rw-r--r-- | iw/partition_gui.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/iw/partition_gui.py b/iw/partition_gui.py index 213bd8ff2..8ec407afb 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -435,8 +435,9 @@ class DiskTreeModel(gtk.TreeStore): path = self.get_path(parent) self.view.expand_row(path, gtk.TRUE) selection = self.view.get_selection() - selection.unselect_all() - selection.select_iter(iter) + if selection is not None: + selection.unselect_all() + selection.select_iter(iter) path = self.get_path(iter) col = self.view.get_column(0) self.view.set_cursor(path, col, gtk.FALSE) @@ -519,7 +520,8 @@ class DiskTreeModel(gtk.TreeStore): def clear(self): selection = self.view.get_selection() - selection.unselect_all() + if selection is not None: + selection.unselect_all() gtk.TreeStore.clear(self) def __getitem__(self, iter): |