@@ -57,25 +57,21 @@ def __init__(self):
57
57
home = os .path .expanduser ('~/' )
58
58
failobj = "{}.config" .format (home )
59
59
xdg_config_home = os .environ .get ('XDG_CONFIG_HOME' , failobj )
60
- if xdg_config_home :
61
- if not os .path .exists (xdg_config_home ):
62
- raise ValueError ('$XDG_CONFIG_HOME: {} does not exist'
63
- .format (xdg_config_home ))
64
- if not xdg_config_home .startswith (home ):
65
- raise ValueError ('$XDG_CONFIG_HOME: {} must be '
66
- 'somewhere within your home '
67
- 'directory: {}'
68
- .format (xdg_config_home , home ))
69
- if config .has_section ('xdg_configuration_files' ):
70
- for path in config .options ('xdg_configuration_files' ):
71
- if path .startswith ('/' ):
72
- raise ValueError ('Unsupported absolute path: '
73
- '{}'
74
- .format (path ))
75
- path = os .path .join (xdg_config_home , path )
76
- path = path .replace (home , '' )
77
- (self .apps [app_name ]['configuration_files' ]
78
- .add (path ))
60
+ if not xdg_config_home .startswith (home ):
61
+ raise ValueError ('$XDG_CONFIG_HOME: {} must be '
62
+ 'somewhere within your home '
63
+ 'directory: {}'
64
+ .format (xdg_config_home , home ))
65
+ if config .has_section ('xdg_configuration_files' ):
66
+ for path in config .options ('xdg_configuration_files' ):
67
+ if path .startswith ('/' ):
68
+ raise ValueError ('Unsupported absolute path: '
69
+ '{}'
70
+ .format (path ))
71
+ path = os .path .join (xdg_config_home , path )
72
+ path = path .replace (home , '' )
73
+ (self .apps [app_name ]['configuration_files' ]
74
+ .add (path ))
79
75
80
76
@staticmethod
81
77
def get_config_files ():
0 commit comments