Another more portable user/home finder

This commit is contained in:
Luke Murphy 2020-04-12 00:05:32 +02:00
parent af2a228310
commit fd75435a9c
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC
1 changed files with 2 additions and 6 deletions

View File

@ -1,12 +1,8 @@
"""Tool configuration."""
from getpass import getuser
from os.path import expanduser
# current user
WHOAMI = getuser()
# home directory of the current user
HOME_DIR = "/home/{}".format(WHOAMI)
HOME_DIR = expanduser("~")
# configuration directory for the toolbelt
CONFIG_DIR = "{}/.autonomic".format(HOME_DIR)