Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/sugar/p2p
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <mpg@redhat.com>2006-05-23 02:14:22 (GMT)
committer Marco Pesenti Gritti <mpg@redhat.com>2006-05-23 02:14:22 (GMT)
commita32007ec7a87726f5ab780745382a47b07c40997 (patch)
tree9521a10dccc20b65d7253c7b50eb67985c80dfa2 /sugar/p2p
parentd213eada769f337bf0f538b1d670c0ab97caec54 (diff)
Add two env vars to set nick name and user dir
Diffstat (limited to 'sugar/p2p')
-rw-r--r--sugar/p2p/Buddy.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/sugar/p2p/Buddy.py b/sugar/p2p/Buddy.py
index ea08c21..c98ce96 100644
--- a/sugar/p2p/Buddy.py
+++ b/sugar/p2p/Buddy.py
@@ -82,8 +82,10 @@ class Owner(Buddy):
"""Class representing the owner of this machine/instance."""
def __init__(self, group):
self._group = group
-
- nick = pwd.getpwuid(os.getuid())[0]
+
+ nick = env.get_nick_name()
+ if not nick:
+ nick = pwd.getpwuid(os.getuid())[0]
if not nick or not len(nick):
nick = "n00b"