Another more portable user/home finder
This commit is contained in:
parent
af2a228310
commit
fd75435a9c
@ -1,12 +1,8 @@
|
|||||||
"""Tool configuration."""
|
"""Tool configuration."""
|
||||||
|
|
||||||
from getpass import getuser
|
from os.path import expanduser
|
||||||
|
|
||||||
# current user
|
HOME_DIR = expanduser("~")
|
||||||
WHOAMI = getuser()
|
|
||||||
|
|
||||||
# home directory of the current user
|
|
||||||
HOME_DIR = "/home/{}".format(WHOAMI)
|
|
||||||
|
|
||||||
# configuration directory for the toolbelt
|
# configuration directory for the toolbelt
|
||||||
CONFIG_DIR = "{}/.autonomic".format(HOME_DIR)
|
CONFIG_DIR = "{}/.autonomic".format(HOME_DIR)
|
||||||
|
Reference in New Issue
Block a user