Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/jarabe/intro/__init__.py
blob: d2e92762872cc8f3c836c43c8c9141eef3b4d6fe (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
26
import os

from gi.repository import Gtk

from sugar3 import env
from sugar3.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()