Skip to content

Commit

Permalink
manage.py cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Archmonger committed Apr 9, 2022
1 parent 46cfe67 commit e58d14c
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions manage.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
"""Django's command-line utility for administrative tasks."""
import contextlib
import os
import subprocess
import sys

from conreq.utils.environment import get_safe_mode, set_env
from conreq.utils.environment import set_env


# pylint: disable=import-outside-toplevel
def main():
# Check if Django is installed
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "conreq.settings")
Expand Down Expand Up @@ -47,15 +49,12 @@ def run_in_safe_mode(exception):
sys_env=True,
dot_env=False,
)
get_safe_mode.cache_clear()
start_command = f'{sys.executable} {" ".join(sys.argv)}'
subprocess.run(start_command.split(" "), check=True)
except Exception as exception_2:
raise exception from exception_2


if __name__ == "__main__":
try:
with contextlib.suppress(KeyboardInterrupt):
main()
except KeyboardInterrupt:
pass

0 comments on commit e58d14c

Please sign in to comment.