diff options
author | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-29 17:16:58 +0100 |
---|---|---|
committer | Arthur de Jong <arthur@arthurdejong.org> | 2013-03-29 17:21:54 +0100 |
commit | 65a65adbf953ee8da43a76db2cd03a064a80cd46 (patch) | |
tree | 3cb662dae984c66f43370031e57990d1ed346086 | |
parent | 46cf240eff487be2cdbe86439805f3adb8f570ef (diff) |
Switch to using os.environ instead of os.putenv()
The os.putenv() call doesn't update os.environ and Python documentation
recommends using os.environ.
-rwxr-xr-x | pynslcd/pynslcd.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pynslcd/pynslcd.py b/pynslcd/pynslcd.py index 6c2d28a..0082f24 100755 --- a/pynslcd/pynslcd.py +++ b/pynslcd/pynslcd.py @@ -252,9 +252,9 @@ if __name__ == '__main__': parse_cmdline() # clean the environment os.environ.clear() - os.putenv('HOME', '/') - os.putenv('TMPDIR', '/tmp') - os.putenv('LDAPNOINIT', '1') + os.environ['HOME'] = '/' + os.environ['TMPDIR'] = '/tmp' + os.environ['LDAPNOINIT'] = '1' # set log level if debugging: logging.getLogger().setLevel(logging.DEBUG) |