Start intro if config is absent or corrupted.

Cleanups.
This commit is contained in:
Marco Pesenti Gritti
2007-07-30 15:34:02 +02:00
parent 72857326d2
commit e2beb5b566
4 changed files with 30 additions and 17 deletions
+7 -4
View File
@@ -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