From f4593f15e9f62219520741ecafb348d9c4a40651 Mon Sep 17 00:00:00 2001 From: Emmanuel Perrier Date: Fri, 22 May 2015 13:34:47 +0200 Subject: [PATCH] use default XDG_CONFIG_HOME if it exists Signed-off-by: Emmanuel Perrier --- gitup/config.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gitup/config.py b/gitup/config.py index 5571cfe..ad5df60 100644 --- a/gitup/config.py +++ b/gitup/config.py @@ -13,7 +13,8 @@ from colorama import Fore, Style __all__ = ["get_bookmarks", "add_bookmarks", "delete_bookmarks", "list_bookmarks"] -CONFIG_FILENAME = os.path.join(os.path.expanduser("~"), ".gitup") +CONFIG_FILENAME = os.path.join(os.path.expanduser('~/.config'), '.gitup') if \ + os.path.exists(os.path.expanduser('~/.config')) else os.path.join(os.path.expanduser('~'), '.gitup') YELLOW = Fore.YELLOW + Style.BRIGHT RED = Fore.RED + Style.BRIGHT