Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands/run
blob: f3a5f4abe96f7d79860adf107ddc85973cab1819 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python

import os
import sys

import common

from devbot import run
from devbot import config

common.setup()

profile_env = os.environ.get("SUGAR_PROFILE", None)
profile_pref = config.get_pref("PROFILE")

if profile_env is not None:
    if profile_pref is None:
        config.set_pref("PROFILE", _get_random_id())
    elif profile_pref == profile_env:
        print "Cannot run two instances with the same profile."
        sys.exit(1)

run.run("sugar-runner")