Skip to content

Commit

Permalink
Shove the input into the main method
Browse files Browse the repository at this point in the history
  • Loading branch information
tvon committed Apr 21, 2017
1 parent fe74190 commit 1a65167
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions files/create_project.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,6 @@
from optparse import OptionParser
from urllib import quote

from sentry.utils.runner import configure
configure()

from django.conf import settings

# Add in the sentry object models
from sentry.models import Organization, Project, ProjectKey, Team, User


def build_parser():
parser = OptionParser()
Expand All @@ -23,7 +15,7 @@ def build_parser():
parser.add_option("-o", "--org", dest="org", help="Organization to own this project", type="string")
parser.add_option("-t", "--team", dest="team", help="Team to own this project", type="string")
parser.add_option("-v", "--verbose", dest="verbose", help="Verbose output", action="store_true")
parser.add_option("-s", "--sentry-path", dest="sentry_path", help="Path to sentry project", action="store_true")
parser.add_option("-s", "--sentry-path", dest="sentry_path", help="Path to sentry project", type="string")
return parser


Expand All @@ -33,6 +25,13 @@ def main():

os.environ['SENTRY_CONF'] = options.sentry_path

from sentry.utils.runner import configure
configure()

from django.conf import settings
# Add in the sentry object models
from sentry.models import Organization, Project, ProjectKey, Team, User

admin_email = settings.SENTRY_OPTIONS['system.admin-email']

if not options.project:
Expand Down

0 comments on commit 1a65167

Please sign in to comment.