2015-10-04 18:56:26 +02:00
|
|
|
#!/usr/bin/env python2.7
|
2012-08-28 18:45:35 +02:00
|
|
|
import os
|
|
|
|
import sys
|
2013-11-19 00:04:45 +01:00
|
|
|
import logging
|
|
|
|
import subprocess
|
2012-08-28 18:45:35 +02:00
|
|
|
|
|
|
|
if __name__ == "__main__":
|
2015-10-02 21:06:12 +02:00
|
|
|
if 'posix' in os.name and os.geteuid() == 0:
|
|
|
|
from django.core.management.base import CommandError
|
|
|
|
raise CommandError("manage.py should not be run as root.")
|
2013-11-19 00:04:45 +01:00
|
|
|
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "zproject.settings")
|
2016-03-11 09:26:44 +01:00
|
|
|
os.environ.setdefault("PYTHONSTARTUP", os.path.join(os.path.dirname(__file__), "scripts/lib/pythonrc.py"))
|
2013-11-19 00:04:45 +01:00
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
logger = logging.getLogger("zulip.management")
|
2016-05-08 04:00:48 +02:00
|
|
|
subprocess.check_call([os.path.join(os.path.dirname(__file__), "scripts", "lib", "log-management-command"),
|
2013-11-19 00:04:45 +01:00
|
|
|
" ".join(sys.argv)])
|
2013-05-22 21:18:45 +02:00
|
|
|
|
|
|
|
if "--no-traceback" not in sys.argv and len(sys.argv) > 1:
|
|
|
|
sys.argv.append("--traceback")
|
|
|
|
|
2012-08-28 18:45:35 +02:00
|
|
|
from django.core.management import execute_from_command_line
|
|
|
|
|
|
|
|
execute_from_command_line(sys.argv)
|