Refactor empty exception handler

This commit is contained in:
Davis Goglin 2016-03-14 17:41:20 -07:00 committed by Davis Goglin
parent 87a73beb31
commit 27352b071c
1 changed files with 1 additions and 3 deletions

View File

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