The try except seems superfluous to me, I'd change this to:

```
path = os.environ.get(evar)
if path is not None and os.path.isdir(path):
    return path
```