Skip to content

Commit 8667da4

Browse files
committed
Remove seemingly unnecessary import compat
1 parent 1f66093 commit 8667da4

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

demo/manage.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,10 @@
77
try:
88
from django.core.management import execute_from_command_line
99
except ImportError:
10-
# The above import may fail for some other reason. Ensure that the
11-
# issue is really that Django is missing to avoid masking other
12-
# exceptions on Python 2.
13-
try:
14-
import django
15-
except ImportError:
16-
raise ImportError(
17-
"Couldn't import Django. Are you sure it's installed and "
18-
"available on your PYTHONPATH environment variable? Did you "
19-
"forget to activate a virtual environment?"
20-
)
21-
raise
10+
raise ImportError(
11+
"Couldn't import Django. Are you sure it's installed and "
12+
"available on your PYTHONPATH environment variable? Did you "
13+
"forget to activate a virtual environment?"
14+
)
15+
2216
execute_from_command_line(sys.argv)

0 commit comments

Comments
 (0)