diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-12 19:34:06 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-08-12 19:34:06 (GMT) |
commit | d41c761e022ef9858c34edae9850611215665029 (patch) | |
tree | 4b8b077b05017968f72df87404debf306a36f922 /shell | |
parent | 2636bc63d0d4c2227455925b7df9ad81d8691acb (diff) |
Simplify profile/nick name code. Use SUGAR_NICK_NAME env.
Diffstat (limited to 'shell')
-rw-r--r-- | shell/session/Session.py | 2 | ||||
-rwxr-xr-x | shell/sugar | 16 |
2 files changed, 1 insertions, 17 deletions
diff --git a/shell/session/Session.py b/shell/session/Session.py index 578fe72..de6b514 100644 --- a/shell/session/Session.py +++ b/shell/session/Session.py @@ -71,7 +71,7 @@ class Session: process.start() console = ConsoleWindow() - sugar.logger.start('Shell', console) + #sugar.logger.start('Shell', console) process = MatchboxProcess() process.start() diff --git a/shell/sugar b/shell/sugar index 42de27e..16744cc 100755 --- a/shell/sugar +++ b/shell/sugar @@ -24,22 +24,6 @@ def add_to_python_path(path): else: os.environ['PYTHONPATH'] = path -i = 0 -for arg in sys.argv: - if arg == '--test-user': - user = sys.argv[i + 1] - user_dir = os.path.expanduser('~/.sugar-' + user) - os.environ['SUGAR_NICK_NAME'] = user - os.environ['SUGAR_USER_DIR'] = user_dir - i += 1 - -if not os.environ.has_key("SUGAR_NICK_NAME"): - nick = pwd.getpwuid(os.getuid())[0] - if not nick or not len(nick): - nick = "Guest %d" % random.randint(1, 10000) - os.environ['SUGAR_NICK_NAME'] = nick - os.environ['SUGAR_USER_DIR'] = os.path.expanduser('~/.sugar') - curdir = os.path.abspath(os.path.dirname(__file__)) basedir = os.path.dirname(curdir) |