From f552979125531fade029bc8baa51e2d0bb9dd320 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kim=20Silkeb=C3=A6kken?= Date: Thu, 13 Dec 2012 14:57:55 +0100 Subject: [PATCH] Simplify retrieving of config home in core init method --- powerline/core.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/powerline/core.py b/powerline/core.py index 85dd36d1..54922066 100644 --- a/powerline/core.py +++ b/powerline/core.py @@ -11,10 +11,7 @@ from theme import Theme class Powerline(object): def __init__(self, ext): - try: - config_home = os.environ['XDG_CONFIG_HOME'] - except KeyError: - config_home = os.path.expanduser('~/.config') + config_home = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config')) config_path = os.path.join(config_home, 'powerline') plugin_path = os.path.realpath(os.path.dirname(__file__))