Simplify retrieving of config home in core init method

This commit is contained in:
Kim Silkebækken 2012-12-13 14:57:55 +01:00
parent 203a32e778
commit f552979125
1 changed files with 1 additions and 4 deletions

View File

@ -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__))