Don't treat directories as files

Powerline apparently blows up if you enter a directory which contains a directory named "powerline-shell.json".

This fixes it.
This commit is contained in:
Dor Kleiman 2020-04-30 00:18:41 +03:00 committed by GitHub
parent a9b8c9bb39
commit 2def9292e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -149,7 +149,7 @@ def find_config():
os.path.join(os.environ.get("XDG_CONFIG_HOME", "~/.config"), "powerline-shell", "config.json"),
]:
full = os.path.expanduser(location)
if os.path.exists(full):
if os.path.isfile(full):
return full
DEFAULT_CONFIG = {