~usb-creator-hackers/usb-creator/pygi

« back to all changes in this revision

Viewing changes to usbcreator/install.py

  • Committer: Colin Watson
  • Date: 2010-09-06 16:26:47 UTC
  • mfrom: (319.1.1 allow-system-internal)
  • Revision ID: cjwatson@canonical.com-20100906162647-lr3cdxc56jxuwy56
mergeĀ lp:~cjwatson/usb-creator/allow-system-internal

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        Thread.join(self, timeout)
62
62
 
63
63
class install(Thread):
64
 
    def __init__(self, source, target, persist, device=None):
 
64
    def __init__(self, source, target, persist, device=None,
 
65
                 allow_system_internal=False):
65
66
        Thread.__init__(self)
66
67
        self.source = source
67
68
        self.target = target
68
69
        self.persist = persist
69
70
        self.device = device
 
71
        self.allow_system_internal = allow_system_internal
70
72
        self._stopevent = Event()
71
73
        self.progress_thread = None
72
74
        logging.debug('install thread source: %s' % source)
207
209
                bus = dbus.SystemBus()
208
210
                obj = bus.get_object('com.ubuntu.USBCreator',
209
211
                                     '/com/ubuntu/USBCreator')
210
 
                obj.InstallBootloader(self.device,
 
212
                obj.InstallBootloader(self.device, self.allow_system_internal,
211
213
                                      dbus_interface='com.ubuntu.USBCreator',
212
214
                                      timeout=MAX_DBUS_TIMEOUT)
213
215
            except dbus.DBusException:
376
378
                bus = dbus.SystemBus()
377
379
                obj = bus.get_object('com.ubuntu.USBCreator',
378
380
                                     '/com/ubuntu/USBCreator')
379
 
                obj.Image(self.source, self.device,
 
381
                obj.Image(self.source, self.device, self.allow_system_internal,
380
382
                          dbus_interface='com.ubuntu.USBCreator',
381
383
                          timeout=MAX_DBUS_TIMEOUT)
382
384
            except dbus.DBusException: