diff --git a/LCS/PyCommon/dbcredentials.py b/LCS/PyCommon/dbcredentials.py index 05f89b60fdfe72cf45db3dccacc956219272bbe9..e06b7d20b43dc56a386106d2cc6313e11d8ca2d8 100644 --- a/LCS/PyCommon/dbcredentials.py +++ b/LCS/PyCommon/dbcredentials.py @@ -29,9 +29,9 @@ __all__ = ["DBCredentials", "options_group", "parse_options"] # obtain the environment, and add USER and HOME if needed (since supervisord does not) environ = os.environ -user_info = pwd.getpwduid(os.getuid()) -environ.setdefault("HOME", user_info["pw_dir"]) -environ.setdefault("USER", user_info["pw_name"]) +user_info = pwd.getpwuid(os.getuid()) +environ.setdefault("HOME", user_info.pw_dir) +environ.setdefault("USER", user_info.pw_name) def findfiles(pattern): """ Returns a list of files matched by `pattern'.