diff options
author | Marco Pesenti Gritti <mpg@redhat.com> | 2007-07-30 13:34:02 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <mpg@redhat.com> | 2007-07-30 13:34:02 (GMT) |
commit | e2beb5b566bbe81d29bdb0fd39122334706092ca (patch) | |
tree | f45d53dca1712570f00cae519d87cbf21d902a8f /shell | |
parent | 72857326d28917131604837ca7e1201d320be606 (diff) |
Start intro if config is absent or corrupted.
Cleanups.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/intro/intro.py | 11 | ||||
-rwxr-xr-x | shell/sugar-shell | 3 |
2 files changed, 8 insertions, 6 deletions
diff --git a/shell/intro/intro.py b/shell/intro/intro.py index 99e1890..b760c81 100644 --- a/shell/intro/intro.py +++ b/shell/intro/intro.py @@ -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 diff --git a/shell/sugar-shell b/shell/sugar-shell index 8bd3dd0..8d9fd2f 100755 --- a/shell/sugar-shell +++ b/shell/sugar-shell @@ -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() |