Skip to content

Commit 670ada9

Browse files
committed
Use streamlined command entry point
Signed-off-by: Philippe Ombredanne <[email protected]>
1 parent 79d2ca8 commit 670ada9

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

manage.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,6 @@
11
#!/usr/bin/env python
2-
import os
3-
import sys
42

53
if __name__ == "__main__":
6-
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "vulnerablecode.settings")
7-
try:
8-
from django.core.management import execute_from_command_line
9-
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
22-
execute_from_command_line(sys.argv)
4+
from vulnerablecode import command_line
5+
6+
command_line()

0 commit comments

Comments
 (0)