Skip to content

Commit b2d69c5

Browse files
committed
Replace manage.py script with new script generated by Django 1.6
- Legacy-Id: 6876
1 parent b92a49b commit b2d69c5

1 file changed

Lines changed: 4 additions & 21 deletions

File tree

ietf/manage.py

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,10 @@
11
#!/usr/bin/env python
2-
# Copyright The IETF Trust 2007, All Rights Reserved
3-
4-
# Don't complain about these DeprecationWarnings (we still
5-
# want to see others, though)
6-
import warnings
7-
warnings.filterwarnings("ignore", message="the sets module is deprecated")
8-
warnings.filterwarnings("ignore", message="the md5 module is deprecated; use hashlib instead")
9-
warnings.filterwarnings("ignore", message="the sha module is deprecated; use the hashlib module instead")
10-
112
import os
123
import sys
134

14-
path = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
15-
if not path in sys.path:
16-
sys.path.insert(0, path)
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
177

18-
from django.core.management import execute_manager
19-
try:
20-
import settings # Assumed to be in the same directory.
21-
except ImportError:
22-
import sys
23-
sys.stderr.write("Error: Cannot find 'settings.py' or 'settings_local.py'.\nUsually these are in the directory containing %r.\n" % __file__)
24-
sys.exit(1)
8+
from django.core.management import execute_from_command_line
259

26-
if __name__ == "__main__":
27-
execute_manager(settings)
10+
execute_from_command_line(sys.argv)

0 commit comments

Comments
 (0)