liveusb/creator.py | 4 ++--
liveusb/gui.py | 10 +++++-----
setup.py | 3 +++
3 files changed, 10 insertions(+), 7 deletions(-)
New commits:
commit 9afdb71c4b17f91417aedfa889a6bba38753b745
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jan 1 22:00:20 2009 -0500
Some py2exe optimizations
diff --git a/setup.py b/setup.py
index f26567b..486d91a 100644
--- a/setup.py
+++ b/setup.py
@@ -36,6 +36,8 @@ if sys.platform == 'win32':
#"includes" : ["sip", "PyQt4._qt"],
"includes" : ["sip"],
'bundle_files': 1,
+ 'optimize': 2,
+ 'compressed': True,
}
},
zipfile=None,
commit 2d533389268c7959e48360d421120275ac5d75c5
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jan 1 21:59:44 2009 -0500
Use the new uac_info=requireAdministrator py2exe flag to ensure that the liveusb-creator is being run as an admin
diff --git a/setup.py b/setup.py
index 7124f3f..f26567b 100644
--- a/setup.py
+++ b/setup.py
@@ -28,6 +28,7 @@ if sys.platform == 'win32':
{
"script" : "liveusb-creator",
"icon_resources" : [(0, "data/fedora.ico")],
+ "uac_info": "requireAdministrator",
}
],
options={
commit e872c822b1363bcfe70bb8049d96552627a4e14f
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jan 1 21:29:40 2009 -0500
Fix some Python2.6 deprecation warnings with regard to the BaseException.message
diff --git a/liveusb/gui.py b/liveusb/gui.py
index 3368dd6..6dc5837 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -199,7 +199,7 @@ class LiveUSBThread(QtCore.QThread):
self.status(_("Complete! (%s)" % duration))
except Exception, e:
- self.status(e.message)
+ self.status(str(e))
self.status(_("LiveUSB creation failed!"))
self.live.log.exception(e)
@@ -266,7 +266,7 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
self.driveBox.addItem(device)
self.startButton.setEnabled(True)
except LiveUSBError, e:
- self.textEdit.setPlainText(e.message.encode('utf8'))
+ self.textEdit.setPlainText(str(e).encode('utf8'))
self.startButton.setEnabled(False)
def populate_releases(self):
@@ -361,7 +361,7 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
try:
self.live.mount_device()
except LiveUSBError, e:
- self.status(e.message)
+ self.status(str(e))
self.enable_widgets(True)
return
@@ -386,7 +386,7 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
try:
self.live.delete_liveos()
except LiveUSBError, e:
- self.status(e.message)
+ self.status(str(e))
self.live.unmount_device()
self.enable_widgets(True)
return
@@ -434,7 +434,7 @@ class LiveUSBDialog(QtGui.QDialog, LiveUSBInterface):
try:
self.live.iso = self._to_unicode(isofile)
except Exception, e:
- self.live.log.error(e.message.encode('utf8'))
+ self.live.log.error(str(e).encode('utf8'))
self.status(_("Sorry, I'm having trouble encoding the filename "
"of your livecd. You may have better luck if "
"you move your ISO to the root of your drive "
commit 368f44d16f9fc7156931af886bff2f97cbab7d6e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Thu Jan 1 21:28:26 2009 -0500
Use hashlib instead of the sha module.
diff --git a/liveusb/creator.py b/liveusb/creator.py
index c5846d0..178347c 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -28,8 +28,8 @@ include the LinuxLiveUSBCreator and the WindowsLiveUSBCreator.
import subprocess
import tempfile
import logging
+import hashlib
import shutil
-import sha
import os
import re
@@ -201,7 +201,7 @@ class LiveUSBCreator(object):
release = self.get_release_from_iso()
if release:
progress.set_max_progress(self.isosize / 1024)
- checksum = sha.new()
+ checksum = hashlib.sha1()
isofile = file(self.iso, 'rb')
bytes = 1024**2
total = 0