Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
List overview
Download
liveusb-creator
February 2013
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
liveusb-creator@lists.stg.fedorahosted.org
1 participants
1 discussions
Start a n
N
ew thread
Branch 'develop' - 3 commits - liveusb/creator.py liveusb/gui.py liveusb/releases.py
by Luke Macken
05 Feb '13
05 Feb '13
liveusb/creator.py | 58 ++++++++++++++++++++++++++-------------------------- liveusb/gui.py | 5 ++-- liveusb/releases.py | 2 - 3 files changed, 33 insertions(+), 32 deletions(-) New commits: commit 8abe99e9cff41bc6ebcf9b64c1112cb8b7c8d2aa Author: Luke Macken <lmacken(a)redhat.com> Date: Tue Feb 5 19:25:37 2013 -0500 Change the arch order (#811) diff --git a/liveusb/releases.py b/liveusb/releases.py index b483d7b..138d7b9 100644 --- a/liveusb/releases.py +++ b/liveusb/releases.py @@ -3,7 +3,7 @@ from urlgrabber import urlread from urlgrabber.grabber import URLGrabError FEDORA_RELEASES = '
http://dl.fedoraproject.org/pub/fedora/linux/releases/
' -ARCHES = ('i386', 'i686', 'x86_64') +ARCHES = ('x86_64', 'i686', 'i386') # A backup list of releases, just in case we can't fetch them. fedora_releases = [ commit 3a3aa8c36d472140002b48177c5093cf1c686cd6 Author: Luke Macken <lmacken(a)redhat.com> Date: Tue Jan 15 16:51:39 2013 -0500 Support non-ascii mount points (#660603) diff --git a/liveusb/creator.py b/liveusb/creator.py index 44e33e4..cc2cb45 100755 --- a/liveusb/creator.py +++ b/liveusb/creator.py @@ -454,7 +454,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): 'fsversion': str(dev.Get(device, 'IdVersion')), 'uuid': str(dev.Get(device, 'IdUuid')), 'device': str(dev.Get(device, 'DeviceFile')), - 'mount': map(str, list(dev.Get(device, 'DeviceMountPaths'))), + 'mount': map(unicode, list(dev.Get(device, 'DeviceMountPaths'))), 'bootable': 'boot' in map(str, list(dev.Get(device, 'PartitionFlags'))), 'parent': None, @@ -537,12 +537,12 @@ class LinuxLiveUSBCreator(LiveUSBCreator): return is_volume def _add_device(self, dev, parent=None): - mount = str(dev.GetProperty('volume.mount_point')) + mount = unicode(dev.GetProperty('volume.mount_point')) device = str(dev.GetProperty('block.device')) if parent: parent = parent.GetProperty('block.device') self.drives[device] = { - 'label' : str(dev.GetProperty('volume.label')).replace(' ', '_'), + 'label' : unicode(dev.GetProperty('volume.label')).replace(' ', '_'), 'fstype' : str(dev.GetProperty('volume.fstype')), 'fsversion': str(dev.GetProperty('volume.fsversion')), 'uuid' : str(dev.GetProperty('volume.uuid')), @@ -584,7 +584,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): udi = self.drive['udi'] dev_obj = self.bus.get_object("org.freedesktop.UDisks", udi) dev = dbus.Interface(dev_obj, "org.freedesktop.DBus.Properties") - mounts = map(str, list(dev.Get(udi, 'DeviceMountPaths'))) + mounts = map(unicode, list(dev.Get(udi, 'DeviceMountPaths'))) if not mounts: self.log.error(_('No mount points found after mounting attempt')) else: @@ -717,7 +717,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): """ Return the number of available bytes on our device """ import statvfs device = device and device or self.dest - stat = os.statvfs(device) + stat = os.statvfs(device.encode('utf-8')) return stat[statvfs.F_BSIZE] * stat[statvfs.F_BAVAIL] def _get_device(self, udi): @@ -843,7 +843,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): parent = self.drive.get('parent', self._drive) if parent is None: parent = self._drive - parent = str(parent) + parent = unicode(parent) self.log.debug('Checking the MBR of %s' % parent) drive = open(parent, 'rb') mbr = ''.join(['%02X' % ord(x) for x in drive.read(2)]) @@ -873,7 +873,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): return mbr == self.get_mbr() def reset_mbr(self): - parent = str(self.drive.get('parent', self._drive)) + parent = unicode(self.drive.get('parent', self._drive)) if '/dev/loop' not in self.drive: mbr = self._get_mbr_bin() if mbr: @@ -896,7 +896,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): # Get size of drive #progress.set_max_progress(self.isosize / 1024) checksum = hashlib.sha1() - device_name = str(self.drive['parent']) + device_name = unicode(self.drive['parent']) device = file(device_name, 'rb') bytes = 1024**2 total = 0 diff --git a/liveusb/gui.py b/liveusb/gui.py index eb6af73..745b4e8 100755 --- a/liveusb/gui.py +++ b/liveusb/gui.py @@ -382,9 +382,10 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface): 2gigs of free space, set the maximum to 2047mb, which is apparently the largest file we can/should store on a vfat partition. """ - if not str(drive): + drive = unicode(drive) + if not drive: return - self._refresh_overlay_slider(str(drive).split()[0]) + self._refresh_overlay_slider(drive.split()[0]) def _refresh_overlay_slider(self, drive=None): """ commit 5f797a329dc86d54ebefd2d09fcca583a880c5ce Author: Luke Macken <lmacken(a)redhat.com> Date: Tue Jan 15 16:51:02 2013 -0500 Wrap more of our strings for i18n diff --git a/liveusb/creator.py b/liveusb/creator.py index bec1ecf..44e33e4 100755 --- a/liveusb/creator.py +++ b/liveusb/creator.py @@ -251,7 +251,7 @@ class LiveUSBCreator(object): self.log.debug('overlaysize = %d' % overlaysize) self.totalsize = overlaysize + self.isosize if self.totalsize > freebytes: - raise LiveUSBError(_("Not enough free space on device." + + raise LiveUSBError(_("Not enough free space on device." + "\n%dMB ISO + %dMB overlay > %dMB free space" % (self.isosize/1024**2, self.overlay, freebytes/1024**2))) @@ -310,7 +310,7 @@ class LiveUSBCreator(object): try: shutil.copyfile(infile, outfile) except Exception, e: - self.log.warning("Unable to copy %s to %s: %s" % (infile, outfile, str(e))) + self.log.warning(_("Unable to copy %s to %s: %s") % (infile, outfile, str(e))) def delete_liveos(self): """ Delete the existing LiveOS """ @@ -319,14 +319,14 @@ class LiveUSBCreator(object): os.path.join(self.dest + os.path.sep, 'syslinux'), os.path.join(self.dest + os.path.sep, 'isolinux')]: if os.path.exists(path): - self.log.debug("Deleting " + path) + self.log.debug(_("Deleting ") + path) # Python for Windows is unable to delete read-only files, if os.path.isdir(path): for f in os.listdir(path): try: os.chmod(os.path.join(path, f), 0777) except OSError, e: - self.log.debug("Unable to delete %s: %s" % (f, str(e))) + self.log.debug(_("Unable to delete %s: %s") % (f, e)) try: shutil.rmtree(path) except OSError, e: @@ -573,10 +573,10 @@ class LinuxLiveUSBCreator(LiveUSBCreator): except dbus.exceptions.DBusException, e: if e.get_dbus_name() == \ 'org.freedesktop.Hal.Device.Volume.AlreadyMounted': - self.log.debug('Device already mounted') + self.log.debug(_('Device already mounted')) else: - self.log.error('Unknown dbus exception while trying to ' - 'mount device: %s' % str(e)) + self.log.error(_('Unknown dbus exception while trying to ' + 'mount device: %s') % str(e)) except Exception, e: raise LiveUSBError(_("Unable to mount device: %s" % str(e))) @@ -593,7 +593,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): self.log.debug("Mounted %s to %s " % (self.drive['device'], self.dest)) else: - self.log.debug("Using existing mount: %s" % self.dest) + self.log.debug(_("Using existing mount: %s") % self.dest) def unmount_device(self): """ Unmount our device """ @@ -614,8 +614,8 @@ class LinuxLiveUSBCreator(LiveUSBCreator): raise LiveUSBError(_("Unsupported filesystem: %s" % self.fstype)) if self.drive['label'] != self.label: - self.log.info("Setting %s label to %s" % (self.drive['device'], - self.label)) + self.log.info(_("Setting %s label to %s") % (self.drive['device'], + self.label)) try: if self.fstype in ('vfat', 'msdos'): try: @@ -628,7 +628,7 @@ class LinuxLiveUSBCreator(LiveUSBCreator): self.popen('/sbin/e2label %s %s' % (self.drive['device'], self.label)) except LiveUSBError, e: - self.log.error("Unable to change volume label: %s" % str(e)) + self.log.error(_("Unable to change volume label: %s") % e) def extract_iso(self): """ Extract self.iso to self.dest """ @@ -946,7 +946,7 @@ class WindowsLiveUSBCreator(LiveUSBCreator): try: vol = win32api.GetVolumeInformation(drive) except pywintypes.error, e: - self.log.error('Unable to get GetVolumeInformation(%s): %s' % (drive, str(e))) + self.log.error(_('Unable to get GetVolumeInformation(%s): %s') % (drive, e)) continue self.drives[drive] = { 'label': vol[0], @@ -985,7 +985,7 @@ class WindowsLiveUSBCreator(LiveUSBCreator): self.log.debug("Set %s label to %s" % (self.drive['device'], self.label)) except pywintypes.error, e: - self.log.warning("Unable to SetVolumeLabel: " + str(e)) + self.log.warning(_("Unable to SetVolumeLabel: ") + e) def get_free_bytes(self, device=None): """ Return the number of free bytes on our selected drive """ @@ -994,7 +994,7 @@ class WindowsLiveUSBCreator(LiveUSBCreator): try: (spc, bps, fc, tc) = win32file.GetDiskFreeSpace(device) except Exception, e: - self.log.error("Problem determining free space: %s" % str(e)) + self.log.error(_("Problem determining free space: %s") % e) return 0 return fc * (spc * bps) # free-clusters * bytes per-cluster @@ -1008,7 +1008,7 @@ class WindowsLiveUSBCreator(LiveUSBCreator): if delta.seconds: self.mb_per_sec = (self.isosize / delta.seconds) / 1024**2 if self.mb_per_sec: - self.log.info(_("Wrote to device at") + " %d MB/sec" % + self.log.info(_("Wrote to device at") + " %d MB/sec" % self.mb_per_sec) def install_bootloader(self): @@ -1075,10 +1075,10 @@ class WindowsLiveUSBCreator(LiveUSBCreator): uuid = None else: uuid = uuid[:4] + '-' + uuid[4:] - self.log.debug("Found UUID %s for %s" % (uuid, drive)) + self.log.debug(_("Found UUID %s for %s") % (uuid, drive)) except Exception, e: self.log.exception(e) - self.log.warning("Exception while fetching UUID: %s" % str(e)) + self.log.warning(_("Exception while fetching UUID: %s") % e) return uuid def _get_device_size(self, drive): @@ -1086,10 +1086,10 @@ class WindowsLiveUSBCreator(LiveUSBCreator): size = None try: size = int(self._get_win32_logicaldisk(drive).Size) - self.log.debug("Max size of %s: %d" % (drive, size)) + self.log.debug(_("Max size of %s: %d") % (drive, size)) except Exception, e: self.log.exception(e) - self.log.warning("Error getting drive size: %s" % str(e)) + self.log.warning(_("Error getting drive size: %s") % e) return size def popen(self, cmd, **kwargs): @@ -1153,8 +1153,8 @@ class WindowsLiveUSBCreator(LiveUSBCreator): proxies['ftp'] = 'ftp://%s' % server settings.Close() except Exception, e: - self.log.warning('Unable to detect proxy settings: %s' % str(e)) - self.log.debug('Using proxies: %s' % proxies) + self.log.warning(_('Unable to detect proxy settings: %s') % e) + self.log.debug(_('Using proxies: %s') % proxies) return proxies def verify_iso_md5(self):
1
0
0
0
Results per page:
10
25
50
100
200