liveusb/creator.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 48278fa1e03f9f4b26bc8f4c5a308e1fc19b8150 Author: Luke Macken lmacken@redhat.com Date: Mon Mar 1 16:16:07 2010 -0500
Don't attempt to reset the MBR if we can't find one (if syslinux isn't installed)
diff --git a/liveusb/creator.py b/liveusb/creator.py index 02d455d..978cb88 100755 --- a/liveusb/creator.py +++ b/liveusb/creator.py @@ -802,9 +802,13 @@ class LinuxLiveUSBCreator(LiveUSBCreator): def reset_mbr(self): parent = str(self.drive.get('parent', self._drive)) if '/dev/loop' not in self.drive: - self.log.info(_('Resetting Master Boot Record') + ' of %s' % parent) mbr = self._get_mbr_bin() - self.popen('cat %s > %s' % (mbr, parent)) + if mbr: + self.log.info(_('Resetting Master Boot Record') + ' of %s' % parent) + self.popen('cat %s > %s' % (mbr, parent)) + else: + self.log.info(_('Unable to reset MBR. You may not have the ' + '`syslinux` package installed')) else: self.log.info(_('Drive is a loopback, skipping MBR reset'))
liveusb-creator@lists.stg.fedorahosted.org