~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to ivle/interpret.py

  • Committer: William Grant
  • Date: 2010-02-26 06:33:35 UTC
  • Revision ID: grantw@unimelb.edu.au-20100226063335-25ka31up8cegwaiz
ivle.interpret.execute_raw now sets a clean environment, in particular with HOME set correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
                for s in cmd_line]
445
445
    proc = subprocess.Popen(cmd_line,
446
446
        stdin=subprocess.PIPE, stdout=subprocess.PIPE,
447
 
        stderr=subprocess.PIPE, cwd=tramp_dir, close_fds=True)
 
447
        stderr=subprocess.PIPE, cwd=tramp_dir, close_fds=True,
 
448
        env={'HOME': os.path.join('/home', user.login),
 
449
             'PATH': os.environ['PATH'],
 
450
             'USER': user.login,
 
451
             'LOGNAME': user.login})
448
452
 
449
453
    (stdout, stderr) = proc.communicate()
450
454
    exitcode = proc.returncode