Skip to content
Snippets Groups Projects
Commit c07f5815 authored by Jan David Mol's avatar Jan David Mol
Browse files

Task #8899: Set HOME and USER, since supervisord does not

parent c4e5bc4b
No related branches found
No related tags found
No related merge requests found
......@@ -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'.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment