Start intro if config is absent or corrupted.
Cleanups.
This commit is contained in:
@@ -232,10 +232,13 @@ class IntroWindow(gtk.Window):
|
||||
# Generate keypair
|
||||
import commands
|
||||
keypath = os.path.join(env.get_profile_path(), "owner.key")
|
||||
cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
|
||||
(s, o) = commands.getstatusoutput(cmd)
|
||||
if s != 0:
|
||||
logging.error("Could not generate key pair: %d" % s)
|
||||
if not os.path.isfile(keypath):
|
||||
cmd = "ssh-keygen -q -t dsa -f %s -C '' -N ''" % keypath
|
||||
(s, o) = commands.getstatusoutput(cmd)
|
||||
if s != 0:
|
||||
logging.error("Could not generate key pair: %d" % s)
|
||||
else:
|
||||
logging.error("Keypair exists, skip generation.")
|
||||
|
||||
gtk.main_quit()
|
||||
return False
|
||||
|
||||
+1
-2
@@ -74,8 +74,7 @@ _start_matchbox()
|
||||
_setup_translations()
|
||||
|
||||
# Do initial setup if needed
|
||||
key = profile.get_pubkey()
|
||||
if not key or not len(key):
|
||||
if not profile.is_valid():
|
||||
win = intro.IntroWindow()
|
||||
win.show_all()
|
||||
gtk.main()
|
||||
|
||||
Reference in New Issue
Block a user