Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/intro/__init__.py
blob: ca4f64d08a71477a2ba6037c4da2e5009e675269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import os

import gtk

from sugar import env
from sugar.profile import get_profile

from jarabe.intro.window import IntroWindow
from jarabe.intro.window import create_profile

def check_profile():
    profile = get_profile()

    path = os.path.join(os.path.expanduser('~/.sugar'), 'debug')
    if not os.path.exists(path):
        profile.create_debug_file()

    path = os.path.join(env.get_profile_path(), 'config')
    if os.path.exists(path):
        profile.convert_profile()

    if not profile.is_valid():
        win = IntroWindow()
        win.show_all()
        gtk.main()