fetch-contributor-data: Fix running in production.

The previous logic attempted to check for a venv, rather than putting
itself into the virtualenv automatically.
This commit is contained in:
Tim Abbott 2020-04-12 12:13:15 -07:00
parent b1e7d8b51d
commit 4f23f13c55
1 changed files with 6 additions and 9 deletions

View File

@ -4,25 +4,22 @@ Fetch contributors data from Github using their API, convert it to structured
JSON data for the /team page contributors section.
"""
# check for the venv
from lib import sanity_check
sanity_check.check_venv(__file__)
import os
import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from scripts.lib.setup_path import setup_path
setup_path()
from typing import Any, Dict, List, Optional, Union
from typing_extensions import TypedDict
import os
import sys
import argparse
from time import sleep
from datetime import date
from random import randrange
import logging
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..'))
from scripts.lib.setup_path import setup_path
setup_path()
os.environ['DJANGO_SETTINGS_MODULE'] = 'zproject.settings'
import django
django.setup()