~didrocks/ubiquity/intall-metrics

« back to all changes in this revision

Viewing changes to ubiquity/plugins/ubi-prepare.py

  • Committer: Jean-Baptiste Lallement
  • Date: 2018-02-28 16:38:42 UTC
  • mfrom: (6586.2.12 minimal-install)
  • Revision ID: jean-baptiste.lallement@ubuntu.com-20180228163842-h13xqc1vim5xp4it
[ Iain Lane ]
* Fix a crash in the KDE frontend - don't refer to a widget that doesn't
  exist. Properly hide the miminal install label and checkbox. (LP:
  #1752323)
* install_misc: Use the `get_casper' function to properly get the location
  of the live media path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
265
265
            from PyQt5 import uic
266
266
            from PyQt5 import QtGui
267
267
            self.page = uic.loadUi('/usr/share/ubiquity/qt/stepPrepare.ui')
268
 
            self.minimal_install_vbox = self.page.minimal_install_vbox
269
268
            self.prepare_minimal_install = self.page.prepare_minimal_install
 
269
            self.label_minimal_install = self.page.label_minimal_install
270
270
            self.prepare_download_updates = self.page.prepare_download_updates
271
271
            self.prepare_nonfree_software = self.page.prepare_nonfree_software
272
272
            self.prepare_foss_disclaimer = self.page.prepare_foss_disclaimer
290
290
            except Exception as e:
291
291
                # TODO use an inconsistent state?
292
292
                print('unable to set up power source watch:', e)
 
293
            if not os.path.exists(minimal_install_rlist_path):
 
294
                self.label_minimal_install.hide()
 
295
                self.prepare_minimal_install.hide()
293
296
            try:
294
297
                self.prepare_network_connection = StateBox(self.page)
295
298
            except Exception as e:
299
302
            self.debug('Could not create prepare page: %s', e)
300
303
            self.page = None
301
304
        self.set_using_secureboot(False)
302
 
        self.minimal_install_vbox.set_visible(
303
 
            os.path.exists(minimal_install_rlist_path))
304
305
        self.plugin_widgets = self.page
305
306
 
306
307
    def show_insufficient_space_page(self, required, free):