diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2007-04-01 23:37:56 +0000 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2007-04-01 23:37:56 +0000 |
commit | ef8b9c19b3f38a6f6506efe4445d81573cd91a62 (patch) | |
tree | 46e50c524ba4965de65c34a74d1d26dfbd75c5cb | |
parent | update grub help text (diff) | |
download | gli-ef8b9c19b3f38a6f6506efe4445d81573cd91a62.tar.gz gli-ef8b9c19b3f38a6f6506efe4445d81573cd91a62.tar.bz2 gli-ef8b9c19b3f38a6f6506efe4445d81573cd91a62.zip |
don't freak out if partition table can't be read
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1847 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r-- | src/fe/gtk/LocalMounts.py | 29 |
1 files changed, 6 insertions, 23 deletions
diff --git a/src/fe/gtk/LocalMounts.py b/src/fe/gtk/LocalMounts.py index 85804e3..cca5023 100644 --- a/src/fe/gtk/LocalMounts.py +++ b/src/fe/gtk/LocalMounts.py @@ -108,9 +108,12 @@ can remove it from the list by clicking the 'Delete' button. self.partitions = {} for device in Partitioning.detect_devices(): - drive = Partitioning.Device(device, self.controller.cc.get_arch(), self.controller.install_profile) - for part in drive: - self.partitions[part['devnode']] = part['type'] + try: + drive = Partitioning.Device(device, self.controller.cc.get_arch(), self.controller.install_profile) + for part in drive: + self.partitions[part['devnode']] = part['type'] + except: + pass self.part_list = self.partitions.keys() self.part_list.sort() for part in self.part_list: @@ -120,7 +123,6 @@ can remove it from the list by clicking the 'Delete' button. def disable_all_fields(self): self.mount_info_device.get_child().set_text("") -# self.mount_info_device.set_model(gtk.ListStore(gobject.TYPE_STRING)) self.mount_info_type.set_text("") self.mount_info_mountpoint.set_text("") self.mount_info_mountopts.set_text("") @@ -131,7 +133,6 @@ can remove it from the list by clicking the 'Delete' button. def enable_all_fields(self): self.mount_info_device.get_child().set_text("") -# self.mount_info_device.set_model(gtk.ListStore(gobject.TYPE_STRING)) self.mount_info_mountpoint.set_text("") self.mount_info_mountopts.set_text("") self.mount_info_device.set_sensitive(True) @@ -140,7 +141,6 @@ can remove it from the list by clicking the 'Delete' button. self.mount_info_mountopts.set_sensitive(True) def refresh_list_at_top(self): -# self.treedata = gtk.ListStore(gobject.TYPE_INT, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING) self.treedata.clear() for i, mount in enumerate(self.localmounts): self.treedata.append([i, mount['devnode'], mount['type'], mount['mountpoint'], mount['mountopts']]) @@ -155,14 +155,6 @@ can remove it from the list by clicking the 'Delete' button. self.active_entry = row[0] mount = self.localmounts[self.active_entry] self.enable_all_fields() -# self.mount_info_export.set_model(gtk.ListStore(gobject.TYPE_STRING)) -# self.mount_info_export.get_child().set_text(mount['export']) -# i = 0 -# for mounttype in self.mount_types: -# if mounttype == mount['type']: -# self.mount_info_type.set_active(i) -# else: -# i = i + 1 self.mount_info_device.get_child().set_text(mount['devnode']) self.mount_info_type.set_text(mount['type']) self.mount_info_mountpoint.set_text(mount['mountpoint']) @@ -239,15 +231,6 @@ can remove it from the list by clicking the 'Delete' button. self.controller.install_profile.set_mounts(self.localmounts) self.controller.load_screen("NetworkMounts") -# progress = ProgressDialog(self.controller, ("mount_local_partitions", ), self.progress_callback) -# progress.run() - -# def progress_callback(self, result, data=None): -# if result == PROGRESS_DONE: -# self.controller.load_screen("Network Mounts") -# else: -# GLIScreen.progress_callback(self, result, data) - def previous(self): self.controller.install_profile.set_mounts(self.localmounts) self.controller.load_screen("Partition") |