Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/env.py
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2006-10-09 13:11:15 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2006-10-09 13:11:15 (GMT)
commitcbd3a52a6852574e3f481dac0ff2fc51c8d5038d (patch)
treed23c947525502e83be7b7640f21ed17eb276ace9 /sugar/env.py
parent1dd8f784535920dc1eb404b491761f442590e68c (diff)
Do not set up the owner of the presence service if there
is no nick name in the env. I'm not sure this is the best approach, we need to figure it out. First go at the new simulator.
Diffstat (limited to 'sugar/env.py')
-rw-r--r--sugar/env.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/sugar/env.py b/sugar/env.py
index b0c5443..036d944 100644
--- a/sugar/env.py
+++ b/sugar/env.py
@@ -14,10 +14,16 @@ def setup_user(profile):
os.environ['SUGAR_COLOR'] = profile.get_color().to_string()
def get_nick_name():
- return os.environ['SUGAR_NICK_NAME']
+ if os.environ.has_key('SUGAR_NICK_NAME'):
+ return os.environ['SUGAR_NICK_NAME']
+ else:
+ return None
def get_color():
- return os.environ['SUGAR_COLOR']
+ if os.environ.has_key('SUGAR_COLOR'):
+ return os.environ['SUGAR_COLOR']
+ else:
+ return None
def setup_python_path():
for path in sugar_python_path: