praw-dev/praw — pull request #128 by binaryechoes (2012-09-27 00:37:52+00:00)
Title: Update praw/settings.py

The ENV while running praw under inittab/upstart supervision is limited. HOME doesn't exist and causes the process to die leading to "respawning" messages.

This simply adds a check for HOME and if it doesn't exist use PWD, which appears to always exist. However, it should also be noted that, unless explicitly set, on my CentOS 6.3 system, PWD always equals /.

If this isn't in place, a/the proper workaround/solution is to explicitly set HOME in the init/upstart (ie /etc/init/reddit.conf) script using, for example "env HOME=/root".