Refactor empty exception handler
This commit is contained in:
parent
87a73beb31
commit
27352b071c
|
@ -20,10 +20,8 @@ config_dirs = [
|
||||||
]
|
]
|
||||||
|
|
||||||
for environ in ('HOME', 'XDG_CONFIG_HOME'):
|
for environ in ('HOME', 'XDG_CONFIG_HOME'):
|
||||||
try:
|
if environ in os.environ:
|
||||||
config_dirs.append(os.environ[environ])
|
config_dirs.append(os.environ[environ])
|
||||||
except (KeyError):
|
|
||||||
pass
|
|
||||||
|
|
||||||
config_files = [os.path.join(x, y) for x, y in list(itertools.product(config_dirs, config_filenames))]
|
config_files = [os.path.join(x, y) for x, y in list(itertools.product(config_dirs, config_filenames))]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue