summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTails developers <amnesia@boum.org>2015-01-21 09:46:53 +0000
committerTails developers <amnesia@boum.org>2015-01-21 09:46:53 +0000
commit50442d4d009ea1725f9f4078aeec2e8141e4bc42 (patch)
tree43f8620eeccdda9a765c211b600ac40a04aea9fe
parent931d8d6a90d48777586a1fe24d33dc253d02494b (diff)
parent4cad42509ddc976c8ae3d635fc851f4f99e8969d (diff)
Merge branch 'master' of git://git.tails.boum.org/liveusb-creator
-rwxr-xr-xliveusb/creator.py16
-rwxr-xr-xliveusb/gui.py2
2 files changed, 11 insertions, 7 deletions
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 20981d6..82721c3 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -907,24 +907,28 @@ class LinuxLiveUSBCreator(LiveUSBCreator):
else:
return False
+ def save_full_drive(self):
+ self._full_drive = self.drives[self._drive]
+
def switch_drive_to_system_partition(self):
- self._full_drive = self._drive
+ full_drive_name = self._full_drive['device']
append = False
- if self._full_drive.startswith('/dev/sd'):
+ if full_drive_name.startswith('/dev/sd'):
append = '1'
- elif self._full_drive.startswith('/dev/mmcblk'):
+ elif full_drive_name.startswith('/dev/mmcblk'):
append = 'p1'
if not append:
self.log.warning(
_("Unsupported device '%(device)s', please report a bug." %
- {'device': self._full_drive})
+ {'device': full_drive_name})
)
self.log.info(_('Trying to continue anyway.'))
append = '1'
- self.drive = '%s%s' % (self._full_drive, append)
+ self.drive = '%s%s' % (full_drive_name, append)
def switch_back_to_full_drive(self):
- self.drive = self._full_drive
+ self.drives[self._full_drive['device']] = self._full_drive
+ self.drive = self._full_drive['device']
def verify_filesystem(self):
self.log.info(_("Verifying filesystem..."))
diff --git a/liveusb/gui.py b/liveusb/gui.py
index f6e82cc..6ac7ce0 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -193,6 +193,7 @@ class LiveUSBThread(QtCore.QThread):
self.handler = LiveUSBLogHandler(self.status)
self.live.log.addHandler(self.handler)
self.now = datetime.now()
+ self.live.save_full_drive()
try:
if self.parent.opts.partition:
self.live.unmount_device()
@@ -256,7 +257,6 @@ class LiveUSBThread(QtCore.QThread):
self.live.unmount_device()
if self.parent.opts.partition:
- self.rescan_devices()
self.live.switch_back_to_full_drive()
self.live.remove_hybrid_mbr()