1
0
forked from VimPlug/jedi

Reorder some open flags for Python 2

This commit is contained in:
Dave Halter
2018-01-26 01:31:47 +01:00
parent fc458a3c2a
commit 1304b4f9e8

View File

@@ -131,7 +131,7 @@ def _is_potential_project(path):
def _is_django_path(directory):
""" Detects the path of the very well known Django library (if used) """
try:
with open(os.path.join(directory, 'manage.py'), 'br') as f:
with open(os.path.join(directory, 'manage.py'), 'rb') as f:
return b"DJANGO_SETTINGS_MODULE" in f.read()
except (FileNotFoundError, NotADirectoryError):
return False