Seems to me that it would be simpler and clearer to assign `getattr(settings, 'GIT_REPO_DIR')` to a variable and refer to that variable multiple times, rather than calling `getattr(settings, 'GIT_REPO_DIR')` multiple times. Also, if that value is a `path` object, you can call the [`isdir()`](http://pythonhosted.org/path.py/api.html#path.path.isdir) method on it instead of using `os.path.isdir()`.