2 commits - liveusb/creator.py liveusb/gui.py
Luke Macken
lmacken at fedoraproject.org
Wed Jan 5 20:51:14 UTC 2011
liveusb/creator.py | 3 ++-
liveusb/gui.py | 7 +++++++
2 files changed, 9 insertions(+), 1 deletion(-)
New commits:
commit 179bc48357518e25fb59d04e8843943248111de5
Author: Luke Macken <lmacken at redhat.com>
Date: Wed Jan 5 15:50:57 2011 -0500
Write out our fail log to the temporary directory
diff --git a/liveusb/creator.py b/liveusb/creator.py
index 32b885e..f626d22 100755
--- a/liveusb/creator.py
+++ b/liveusb/creator.py
@@ -332,7 +332,8 @@ class LiveUSBCreator(object):
def write_log(self):
""" Write out our subprocess stdout/stderr to a log file """
- out = file('liveusb-creator.log', 'a')
+ tmpdir = os.getenv('TEMP', '/tmp')
+ out = file(os.path.join(tmpdir, 'liveusb-creator.log'), 'a')
out.write(self.output.getvalue())
out.close()
commit 37e88fcbf0e581b4bd1d7ceb81d5423495ae3bb6
Author: Luke Macken <lmacken at redhat.com>
Date: Wed Jan 5 15:07:15 2011 -0500
Download releases to the Downloads folder by default.
For Windows XP users, it will save it to 'My Documents'.
diff --git a/liveusb/gui.py b/liveusb/gui.py
index c0380c3..a820c64 100755
--- a/liveusb/gui.py
+++ b/liveusb/gui.py
@@ -27,6 +27,7 @@ A cross-platform graphical interface for the LiveUSBCreator
import os
import sys
import logging
+import urlparse
from time import sleep
from datetime import datetime
@@ -78,6 +79,12 @@ class ReleaseDownloader(QtCore.QThread):
self.emit(QtCore.SIGNAL("status(PyQt_PyObject)"),
_("Downloading %s..." % os.path.basename(self.url)))
grabber = URLGrabber(progress_obj=self.progress, proxies=self.proxies)
+ home = os.getenv('HOME', 'USERPROFILE')
+ filename = os.path.basename(urlparse.urlparse(self.url).path)
+ for folder in ('Downloads', 'My Documents'):
+ if os.path.isdir(os.path.join(home, folder)):
+ filename = os.path.join(home, folder, filename)
+ break
try:
iso = grabber.urlgrab(self.url, reget='simple')
except URLGrabError, e:
More information about the liveusb-creator
mailing list