Reorder some open flags for Python 2

This commit is contained in:
Dave Halter committed 2018-01-26 01:31:47 +01:00
1 parent fc458a3c2a
commit 1304b4f9e8
1 file changed
+1 -1
+1 -1
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