liveusb-creator | 10 +++++++++-
liveusb/__init__.py | 3 ---
2 files changed, 9 insertions(+), 4 deletions(-)
New commits:
commit 284d4b1efc07af51fed8f661b0cb20bfbecc013e
Author: Luke Macken <lmacken(a)redhat.com>
Date: Fri Jan 4 13:50:22 2013 -0500
Don't call sys.exit in our __init__ (rhbz#842878)
diff --git a/liveusb-creator b/liveusb-creator
index 1dc4dea..e3f230c 100755
--- a/liveusb-creator
+++ b/liveusb-creator
@@ -18,6 +18,11 @@
#
# Author(s): Luke Macken <lmacken(a)redhat.com>
+import os
+import sys
+
+from liveusb import _
+
__version__ = '3.11.7'
def parse_args():
@@ -78,7 +83,6 @@ def main():
x = raw_input("\nDone! Press any key to exit")
else:
## Start our graphical interface
- import sys
from liveusb.gui import LiveUSBApp
try:
LiveUSBApp(opts, sys.argv)
@@ -86,4 +90,8 @@ def main():
pass
if __name__ == '__main__':
+ if sys.platform != 'win32':
+ if os.getuid() != 0:
+ print >> sys.stderr, _("You must run this application as root")
+ sys.exit(1)
main()
diff --git a/liveusb/__init__.py b/liveusb/__init__.py
index e3c0556..d0717dd 100644
--- a/liveusb/__init__.py
+++ b/liveusb/__init__.py
@@ -43,9 +43,6 @@ if sys.platform == "win32":
from liveusb.creator import WindowsLiveUSBCreator as LiveUSBCreator
from liveusb.windows_dialog import Ui_Dialog as LiveUSBInterface
else:
- if os.getuid() != 0:
- print >> sys.stderr, _("You must run this application as root")
- sys.exit(1)
from liveusb.creator import LinuxLiveUSBCreator as LiveUSBCreator
from liveusb.linux_dialog import Ui_Dialog as LiveUSBInterface